You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const [, base, command] = basename(file).match(/^(\w+)-(.+)$/);
^
TypeError: basename is not iterable (cannot read property Symbol(Symbol.iterator))
at Object.<anonymous> (D:\a\cml\cml\bin\legacy.js:12:27)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
NPM uses cmd-shim on Windows instead of creating symbolic links. This shim consists of a hardcoded script that calls the executables specified on package.json:bin with the node interpreter, and, because of the indirect call, $0 gets lost in the process.
Because of this, basename(file) equals legacy.js instead of cml-command as expected. Therefore, /^(\w+)-(.+)$/ doesn't match anything (obviously) and we don't have any means to determine which legacy command was called.
The text was updated successfully, but these errors were encountered:
NPM uses
cmd-shim
on Windows instead of creating symbolic links. This shim consists of a hardcoded script that calls the executables specified onpackage.json:bin
with thenode
interpreter, and, because of the indirect call,$0
gets lost in the process.cml/bin/legacy.js
Lines 11 to 12 in 7d664ae
Because of this,
basename(file)
equalslegacy.js
instead ofcml-command
as expected. Therefore,/^(\w+)-(.+)$/
doesn't match anything (obviously) and we don't have any means to determine which legacy command was called.The text was updated successfully, but these errors were encountered: