diff --git a/packages/cli/src/commands/upgrade.js b/packages/cli/src/commands/upgrade.js index c0ddb00b52e8..0a31e96e80e8 100644 --- a/packages/cli/src/commands/upgrade.js +++ b/packages/cli/src/commands/upgrade.js @@ -97,6 +97,21 @@ export const handler = async ({ dryRun, tag, verbose, dedupe }) => { // structuring as nested tasks to avoid bug with task.title causing duplicates const tasks = new Listr( [ + { + title: 'Confirm upgrade', + task: async (ctx, task) => { + const proceed = await task.prompt({ + type: 'Confirm', + message: + 'This will upgrade your RedwoodJS project to the latest version. Do you want to proceed?', + initial: true, + }) + if (!proceed) { + task.skip('Upgrade cancelled by user.') + process.exit(0) + } + }, + }, { title: 'Checking latest version', task: async (ctx) => setLatestVersionToContext(ctx, tag), @@ -183,7 +198,7 @@ export const handler = async ({ dryRun, tag, verbose, dedupe }) => { }, ], { - renderer: verbose && 'verbose', + renderer: verbose ? 'verbose' : 'default', rendererOptions: { collapseSubtasks: false }, }, )