Skip to content

Commit

Permalink
fix(cli): no change deployment prints "hotswap deployment skipped" wi…
Browse files Browse the repository at this point in the history
…thout hotswap flag (#24602)

The "hotswap deployment skipped" message is printed when a full deployment is performed if no changes were detected. 

Before:

```
$ cdk deploy
 ✨ hotswap deployment skipped - no changes were detected (use --force to override)


 ✅  ApiStack (no changes)
```

With this PR:

```
$ cdk deploy

 ✅  ApiStack (no changes)
```
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
comcalvi committed Mar 17, 2023
1 parent dfa09d1 commit 79151fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/api/deploy-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export async function deployStack(options: DeployStackOptions): Promise<DeploySt
debug(`${deployName}: skipping deployment (use --force to override)`);
// if we can skip deployment and we are performing a hotswap, let the user know
// that no hotswap deployment happened
if (options.hotswap) {
if (options.hotswap !== HotswapMode.FULL_DEPLOYMENT) {
print(`\n ${ICON} %s\n`, chalk.bold('hotswap deployment skipped - no changes were detected (use --force to override)'));
}
return {
Expand Down

0 comments on commit 79151fd

Please sign in to comment.