diff --git a/lib/plugins/create/create.js b/lib/plugins/create/create.js index 9296e8bcc..6662f2857 100644 --- a/lib/plugins/create/create.js +++ b/lib/plugins/create/create.js @@ -127,7 +127,9 @@ class Create { }); } else if ('template-path' in this.options) { // Copying template from a local directory - const servicePath = this.options.path ? untildify(this.options.path) : path.join(process.cwd(), this.options.name); + const servicePath = this.options.path + ? untildify(this.options.path) + : path.join(process.cwd(), this.options.name); if (dirExistsSync(servicePath)) { const errorMessage = `A folder named "${servicePath}" already exists.`; throw new ServerlessError(errorMessage);