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

Commit

Permalink
fix: automatically assign cloudfront to true if some options are true
Browse files Browse the repository at this point in the history
  • Loading branch information
arantespp committed Sep 17, 2020
1 parent bb76abf commit 85e0d35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/cli/src/deploy/staticApp/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ export const deployStaticAppCommand: CommandModule = {
type: 'string',
},
})
.middleware((argv) => {
const { acmArn, acmArnExportedName, aliases, spa } = argv;
if (acmArn || acmArnExportedName || aliases || spa) {
argv.cloudfront = true;
}
})
.check(({ aliases, acmArnExportedName, acmArn }) => {
if (aliases && !(acmArn || acmArnExportedName)) {
throw new Error(
Expand Down

0 comments on commit 85e0d35

Please sign in to comment.