-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compatibility with commander v7 (#177)
Fixes the code to work with [`commander` v7](https://github.com/tj/commander.js/blob/master/CHANGELOG.md) (related to #162). A breaking change is that the command and options have been split up. Example from their [changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md): ```js program .command('compress <filename>') .option('-t, --trace') // Old code before Commander 7 .action((filename, cmd)) => { if (cmd.trace) console.log(`Command name is ${cmd.name()}`); }); ``` ```js // New code .action((filename, options, command)) => { if (options.trace) console.log(`Command name is ${command.name()}`); }); ```
- Loading branch information
Showing
2 changed files
with
20 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters