Skip to content

Commit

Permalink
feat(protected change): Only consider a prod stage as protected (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdial89f authored May 9, 2022
1 parent 39f1d2c commit 81ebe92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serverless-stage-destroyer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class ServerlessStageDestroyer {

private checkForProtectedStage(stage: string) {
// Another safeguard against destroying protected stages
if (stage == "master" || stage == "main" || stage == "staging" || stage == "production") {
if (stage.toLowerCase().includes("prod")) {
throw `
**********************************************************************
You've requested a destroy for a protected stage (${stage}).
Expand Down

0 comments on commit 81ebe92

Please sign in to comment.