@oclif/core
Advanced tools
Comparing version 0.5.30 to 0.5.31
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.31](https://github.com/oclif/core/compare/v0.5.30...v0.5.31) (2021-08-18) | ||
### Bug Fixes | ||
* command name parsing when flag=value present ([#231](https://github.com/oclif/core/issues/231)) ([6497514](https://github.com/oclif/core/commit/64975145085b6a9e287dd146a7fda8d3accfab58)) | ||
### [0.5.30](https://github.com/oclif/core/compare/v0.5.29...v0.5.30) (2021-08-16) | ||
@@ -7,0 +14,0 @@ |
@@ -39,6 +39,7 @@ "use strict"; | ||
const isFlag = (s) => s.startsWith('-'); | ||
const isArgWithValue = (s) => s.includes('='); | ||
const finalizeId = (s) => s ? [...final, s].join(':') : final.join(':'); | ||
const hasSubCommandsWithArgs = () => { | ||
const subCommands = config.commands.filter(c => (c.id).startsWith(finalizeId())); | ||
return Boolean(subCommands.find(cmd => cmd.strict === false || cmd.args.length > 0)); | ||
return Boolean(subCommands.find(cmd => { var _a; return cmd.strict === false || ((_a = cmd.args) === null || _a === void 0 ? void 0 : _a.length) > 0; })); | ||
}; | ||
@@ -50,3 +51,3 @@ for (const arg of argv) { | ||
// assume that any subsequent string could be part of the command name | ||
else if (isFlag(arg) || hasSubCommandsWithArgs()) | ||
else if (isArgWithValue(arg) || isFlag(arg) || hasSubCommandsWithArgs()) | ||
break; | ||
@@ -53,0 +54,0 @@ else |
{ | ||
"name": "@oclif/core", | ||
"description": "base library for oclif CLIs", | ||
"version": "0.5.30", | ||
"version": "0.5.31", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/core/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202557
5093