Skip to content

Commit 4655745

Browse files
authored
fix: asinit support --noColors opinion (#2817)
1 parent 67579de commit 4655745

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bin/asinit.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,20 @@ const asinitOptions = {
5555
],
5656
"type": "b",
5757
"alias": "y"
58-
}
58+
},
59+
"noColors": {
60+
"description": "Disables terminal colors.",
61+
"type": "b",
62+
"default": false
63+
},
5964
};
6065

6166
const cliOptions = optionsUtil.parse(process.argv.slice(2), asinitOptions);
6267

68+
if (cliOptions.options.noColors) {
69+
stdoutColors.enabled = false;
70+
}
71+
6372
if (cliOptions.options.help || cliOptions.arguments.length === 0) printHelp();
6473

6574
function printHelp() {

0 commit comments

Comments
 (0)