Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): running the cli with --debug does not print stack traces #28669

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions packages/aws-cdk/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,17 @@ if (!process.stdout.isTTY) {
export async function exec(args: string[], synthesizer?: Synthesizer): Promise<number | void> {
const argv = await parseCommandLineArguments(args);

if (argv.verbose) {
setLogLevel(argv.verbose);
}

if (argv.debug) {
enableSourceMapSupport();
}

if (argv.verbose) {
setLogLevel(argv.verbose);

if (argv.verbose > 2) {
enableTracing(true);
}
// Debug should always imply tracing
if (argv.debug ||argv.verbose > 2) {
kaizencc marked this conversation as resolved.
Show resolved Hide resolved
enableTracing(true);
}

if (argv.ci) {
Expand Down
Loading