diff --git a/lib/actions/FunctionCreate.js b/lib/actions/FunctionCreate.js index 397b1a175..3931a8f87 100644 --- a/lib/actions/FunctionCreate.js +++ b/lib/actions/FunctionCreate.js @@ -126,6 +126,14 @@ usage: serverless function create `, label: name })); + let nodejsChoice = _.find(choices, {value: 'nodejs'}); + + if (nodejsChoice) { + choices = _.without(choices, nodejsChoice); + nodejsChoice.label = 'nodejs (v0.10, soon to be deprecated)'; + choices.push(nodejsChoice); + } + return this.cliPromptSelect(`Please, select a runtime for this new Function`, choices, false) .then(values => this.evt.options.runtime = values[0].value); })