Skip to content

Commit 0c30f12

Browse files
authoredJul 9, 2019
fix(cli): output message when successfully synt'ing multiple stacks (#3259)
The difference of behavior between single-stack and multi-stack `cdk synth` can be off-setting. In order to make this easier on users, output a specific message when a multi-stack synth completes that hints at why a template was not spat out to `STDOUT` and how to make one. Also indicate the directory in which the Cloud Assembly is located.
1 parent e64993a commit 0c30f12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎packages/aws-cdk/bin/cdk.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import 'source-map-support/register';
33

44
import colors = require('colors/safe');
5+
import path = require('path');
56
import yargs = require('yargs');
67

78
import { bootstrapEnvironment, destroyStack, SDK } from '../lib';
@@ -300,7 +301,10 @@ async function initCommandLine() {
300301
return stacks.map(s => s.template);
301302
}
302303

303-
// no output to stdout
304+
// not outputting template to stdout, let's explain things to the user a little bit...
305+
success(`Successfully synthesized to ${colors.blue(path.resolve(appStacks.assembly!.directory))}`);
306+
print(`Supply a stack name (${stacks.map(s => colors.green(s.name)).join(', ')}) to display its template.`);
307+
304308
return undefined;
305309
}
306310

0 commit comments

Comments
 (0)