Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
fix: error message
Browse files Browse the repository at this point in the history
  • Loading branch information
arantespp committed Oct 24, 2020
1 parent 2f19610 commit 17a9ab3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/src/deploy/cloudFormation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ const destroy = async ({ stackName }: { stackName: string }) => {

if (!(await canDestroyStack({ stackName }))) {
const message = `Stack ${stackName} cannot be destroyed while TerminationProtection is enabled.`;
throw message;
throw new Error(message);
}

await emptyStackBuckets({ stackName });
Expand All @@ -510,9 +510,9 @@ export const destroyCloudFormation = async ({
log.info(logPrefix, 'CAUTION! Starting CloudFormation destroy...');
const stackName = defaultStackName || (await getStackName());
log.info(logPrefix, `stackName: ${stackName}`);
await Promise.all([destroy({ stackName })]);
await destroy({ stackName });
} catch (err) {
log.error(logPrefix, 'Cannot destroy cloudformation stack.');
log.error(logPrefix, 'Cannot destroy cloudformation stack.AA');
log.error(logPrefix, 'Error message: %j', err.message);
process.exit();
}
Expand Down

0 comments on commit 17a9ab3

Please sign in to comment.