Skip to content

Commit 1d8905d

Browse files
committed
bump commander
1 parent 8f925eb commit 1d8905d

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

package-lock.json

+16-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"@yeoman/types": "^0.4.0",
6868
"arrify": "^3.0.0",
6969
"chalk": "^5.2.0",
70-
"commander": "7.1.0",
70+
"commander": "^10.0.1",
7171
"debug": "^4.3.4",
7272
"escape-string-regexp": "^5.0.0",
7373
"execa": "^7.1.1",

src/util/command.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class YeomanCommand extends Command {
3636
* @return {YeomanCommand} this;
3737
*/
3838
addGeneratorArguments(generatorArgs = []) {
39-
if (!generatorArgs) {
39+
if (!generatorArgs || generatorArgs.length === 0) {
4040
return this;
4141
}
4242

@@ -94,19 +94,4 @@ export default class YeomanCommand extends Command {
9494
.hideHelp(optionDefinition.hide),
9595
);
9696
}
97-
98-
/**
99-
* Override to reject errors instead of throwing and add command to error.
100-
* @return promise this
101-
*/
102-
parseAsync(argv, parseOptions) {
103-
try {
104-
this.parse(argv, parseOptions);
105-
} catch (commanderError) {
106-
commanderError.command = this;
107-
return Promise.reject(commanderError);
108-
}
109-
110-
return Promise.all(this._actionResults).then(() => this);
111-
}
11297
}

0 commit comments

Comments
 (0)