Skip to content

Commit

Permalink
update to yargs 15.4.1 for coercive reasons (#278)
Browse files Browse the repository at this point in the history
* update to yargs 15.4.1 for coercive reasons

* update to yargs 15.4.1 for coercive reasons part 2

* update to yargs 15.4.1 for coercive reasons part 3

* allow string examples
  • Loading branch information
pirog authored Jul 15, 2024
1 parent 5a09a57 commit c4ed80c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 435 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Added `appConfig` to `lando` for more powerful tasks
* Added `primary` to `appConfig` for more powerful tasks
* Added `otable` to `formatData`
* Updated to `yargs@13.3.0` for better `--` handling
* Updated to `yargs@15.4.1` for better `--` handling

## v3.21.2 - [June 20, 2024](https://github.com/lando/cli/releases/tag/v3.21.2)

Expand Down
5 changes: 4 additions & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,10 @@ module.exports = class Cli {
}

// examples are also good!
for (const example of examples) yargs.example(...example);
for (const example of examples) {
if (typeof example === 'string') yargs.example(example);
else yargs.example(...example);
}

// and also allow usage
if (usage) yargs.usage(`${this.chalk.green('Usage:')}\n ${usage}`);
Expand Down
Loading

0 comments on commit c4ed80c

Please sign in to comment.