Skip to content

Commit

Permalink
fix: #6153 highlight the destructive delete prompt (#6528)
Browse files Browse the repository at this point in the history
* fix: #6153 highlight the destructive delete prompt

* chore: remove the warning sign from prompt

* chore: address review comment
  • Loading branch information
Attila Hajdrik authored Feb 17, 2021
1 parent 7cd5ccf commit 13333b2
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ora from 'ora';
import chalk from 'chalk';
import { FeatureFlags } from 'amplify-cli-core';
import { removeEnvFromCloud } from './remove-env-from-cloud';
import { getFrontendPlugins } from './get-frontend-plugins';
Expand Down Expand Up @@ -67,9 +68,13 @@ export async function getConfirmation(context, env?) {
const environmentText = env ? `'${env}' environment` : 'all the environments';
return {
proceed: await context.amplify.confirmPrompt(
`Are you sure you want to continue? This CANNOT be undone. (This would delete ${environmentText} of the project from the cloud${
env ? '' : ' and wipe out all the local files created by Amplify CLI'
})`,
chalk.yellow(
`Are you sure you want to continue? This ${chalk.red(
'CANNOT',
)} be undone. (This will delete ${environmentText} of the project from the cloud${
env ? '' : ' and wipe out all the local files created by Amplify CLI'
})`,
),
false,
),
// Placeholder for later selective deletes
Expand Down

0 comments on commit 13333b2

Please sign in to comment.