@oclif/core 4.0.24 → 4.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/command.js +3 -2
- package/package.json +1 -1
package/lib/command.js
CHANGED
|
@@ -237,7 +237,8 @@ class Command {
|
|
|
237
237
|
// Since config.runHook will only run the hook for the root plugin, hookResult.successes will always have a length of 0 or 1
|
|
238
238
|
// But to be extra safe, we find the result that matches the root plugin.
|
|
239
239
|
const argvToParse = hookResult.successes?.length
|
|
240
|
-
? hookResult.successes.find((s) => s.plugin.root === cache_1.default.getInstance().get('rootPlugin')?.root)?.result ??
|
|
240
|
+
? (hookResult.successes.find((s) => s.plugin.root === cache_1.default.getInstance().get('rootPlugin')?.root)?.result ??
|
|
241
|
+
argv)
|
|
241
242
|
: argv;
|
|
242
243
|
this.argv = [...argvToParse];
|
|
243
244
|
const results = await Parser.parse(argvToParse, opts);
|
|
@@ -280,7 +281,7 @@ class Command {
|
|
|
280
281
|
const aliases = (0, util_2.uniq)([...(flagDef?.aliases ?? []), ...(flagDef?.charAliases ?? [])]).map((a) => a.length === 1 ? `-${a}` : `--${a}`);
|
|
281
282
|
if (aliases.length === 0)
|
|
282
283
|
return;
|
|
283
|
-
const foundAliases = aliases.filter((alias) => this.argv.
|
|
284
|
+
const foundAliases = aliases.filter((alias) => this.argv.includes(alias));
|
|
284
285
|
for (const alias of foundAliases) {
|
|
285
286
|
let preferredUsage = `--${flagDef?.name}`;
|
|
286
287
|
if (flagDef?.char) {
|