Skip to content

Commit

Permalink
fix: asinit support --noColors opinion (#2817)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrCai0907 authored Jan 30, 2024
1 parent 67579de commit 4655745
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/asinit.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,20 @@ const asinitOptions = {
],
"type": "b",
"alias": "y"
}
},
"noColors": {
"description": "Disables terminal colors.",
"type": "b",
"default": false
},
};

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

if (cliOptions.options.noColors) {
stdoutColors.enabled = false;
}

if (cliOptions.options.help || cliOptions.arguments.length === 0) printHelp();

function printHelp() {
Expand Down

0 comments on commit 4655745

Please sign in to comment.