Skip to content

Commit

Permalink
feat(toolkit): disable colors if a terminal is not attached to stdout (
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Goodwin committed Jan 30, 2019
1 parent 828ac20 commit 58b4685
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/aws-cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ async function parseCommandLineArguments() {
].join('\n\n'))
.argv;
}
// tslint:enable:no-shadowed-variable max-line-length
if (!process.stdout.isTTY) {
colors.disable();
}

async function initCommandLine() {
const argv = await parseCommandLineArguments();
Expand Down

0 comments on commit 58b4685

Please sign in to comment.