Skip to content

Commit 58b4685

Browse files
author
Sam Goodwin
authoredJan 30, 2019
feat(toolkit): disable colors if a terminal is not attached to stdout (#1641)
1 parent 828ac20 commit 58b4685

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ async function parseCommandLineArguments() {
8383
].join('\n\n'))
8484
.argv;
8585
}
86-
// tslint:enable:no-shadowed-variable max-line-length
86+
if (!process.stdout.isTTY) {
87+
colors.disable();
88+
}
8789

8890
async function initCommandLine() {
8991
const argv = await parseCommandLineArguments();

0 commit comments

Comments
 (0)