diff --git a/cmds/versions/create.js b/cmds/versions/create.js index 1a33593b6..69c11665f 100644 --- a/cmds/versions/create.js +++ b/cmds/versions/create.js @@ -72,7 +72,12 @@ exports.run = async function (opts) { .catch(e => Promise.reject(e.error)); } - const promptResponse = await prompt(promptOpts.createVersionPrompt(versionList || [{}], opts)); + const versionPrompt = promptOpts.createVersionPrompt(versionList || [{}], { + newVersion: version, + ...opts, + }); + + const promptResponse = await prompt(versionPrompt); const options = { json: { version, diff --git a/lib/prompts.js b/lib/prompts.js index 54046ce6a..bbb72b330 100644 --- a/lib/prompts.js +++ b/lib/prompts.js @@ -81,6 +81,7 @@ exports.createVersionPrompt = (versionList, opts, isUpdate) => [ type: 'input', name: 'newVersion', message: "What's your new version?", + initial: opts.newVersion || false, skip() { return opts.newVersion || !isUpdate; },