Skip to content

Commit

Permalink
chore: improve error message of cdk.out is missing (#1055)
Browse files Browse the repository at this point in the history
Encountered someone at a workshop who had copy/pasted into the wrong file,
replacing their app instantiation and invocation, and the error message was

"could not find cdk.out"

Which was super unhelpful and took me a good while to figure out what had happened.

Pinpoint at least one possible cause of this happening in the error message.
  • Loading branch information
rix0rrr authored Oct 31, 2018
1 parent 53c8d76 commit 2b6180d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ async function initCommandLine() {
const outfile = await exec();
debug('outfile:', outfile);
if (!(await fs.pathExists(outfile))) {
throw new Error(`Unable to find output file ${outfile}`);
throw new Error(`Unable to find output file ${outfile}; are you calling app.run()?`);
}

const response = await fs.readJson(outfile);
Expand Down

0 comments on commit 2b6180d

Please sign in to comment.