diff --git a/lib/utils/interactiveCreate.js b/lib/utils/interactiveCreate.js index f9ea06a62..48f21b8b6 100644 --- a/lib/utils/interactiveCreate.js +++ b/lib/utils/interactiveCreate.js @@ -34,16 +34,7 @@ module.exports = path => { { name: 'Other', value: 'other' }, ], }) - .then(({ projectType }) => { - if (projectType === 'other') { - process.stdout.write( - '\nRun “serverless create --help” to view available templates and create a new project ' + - 'from one of those templates.\n\n' - ); - return null; - } - return projectType; - }); + .then(({ projectType }) => projectType); const projectNameInput = () => inquirer @@ -132,7 +123,13 @@ module.exports = path => { if (!createWanted) return null; return projectTypeChoice().then(projectType => { - if (!projectType) return null; + if (projectType === 'other') { + process.stdout.write( + '\nRun “serverless create --help” to view available templates and create a new project ' + + 'from one of those templates.\n\n' + ); + return null; + } return projectNameInput() .then(projectName => { const projectDir = join(process.cwd(), projectName);