Skip to content

Commit

Permalink
cli: fix --lang opt (solves aduros#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
JerwuQu committed Apr 17, 2024
1 parent 5dea0aa commit ae53d65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const langOption = new Option("--lang <lang>", "Use the given language")
.choices(LANGS);

function requireLang (opts) {
if (opts.lang) {
return opts.lang;
}
if (opts.surpriseMe) {
return LANGS[(Math.random()*LANGS.length) >>> 0];
}
Expand Down

0 comments on commit ae53d65

Please sign in to comment.