Skip to content

Commit

Permalink
control no-spinner from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
todor-a committed Feb 3, 2023
1 parent f95288f commit 3a7d544
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

const path = require('path');
const process = require('process');
const program = require('commander');
const {Command, Option} = require('commander');
const rc = require('rc')('madge');
const version = require('../package.json').version;
const ora = require('ora');
const chalk = require('chalk');
const startTime = Date.now();

const program = new Command();

// Revert https://github.com/tj/commander.js/pull/1409
program.storeOptionsAsProperties();

Expand All @@ -34,7 +36,7 @@ program
.option('--ts-config <file>', 'path to typescript config')
.option('--include-npm', 'include shallow NPM modules', false)
.option('--no-color', 'disable color in output and image', false)
.option('--no-spinner', 'disable progress spinner', false)
.addOption(new Option('--no-spinner', 'disable progress spinner', false).env('MADGE_NO_SPINNER'))
.option('--stdin', 'read predefined tree from STDIN', false)
.option('--warning', 'show warnings about skipped files', false)
.option('--debug', 'turn on debug output', false)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"dependencies": {
"chalk": "^4.1.1",
"commander": "^7.2.0",
"commander": "^8.2.0",
"commondir": "^1.0.1",
"debug": "^4.3.1",
"dependency-tree": "^9.0.0",
Expand Down

0 comments on commit 3a7d544

Please sign in to comment.