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
Users of npm-pwsh reported cmd-shim can't link across drives. cspotcode/npm-pwsh#18
npm-pwsh is currently using cmd-shim, but I'd like to switch to @zkochan/cmd-shim. Unfortunately both libraries exhibit this limitation.
The problem can be generalized to handling when the target path must be absolute instead of relative.
... to check if target is an absolute path. If it is, it means we're linking to a different drive letter, so use target verbatim. If not, prepend with %~dp0 just like the current behavior.
Users of npm-pwsh reported cmd-shim can't link across drives.
cspotcode/npm-pwsh#18
npm-pwsh is currently using
cmd-shim
, but I'd like to switch to@zkochan/cmd-shim
. Unfortunately both libraries exhibit this limitation.The problem can be generalized to handling when the target path must be absolute instead of relative.
This can be accomplished by modifying these 2 lines:
https://github.com/pnpm/cmd-shim/blob/master/index.js#L252
https://github.com/pnpm/cmd-shim/blob/master/index.js#L257
... to check if
target
is an absolute path. If it is, it means we're linking to a different drive letter, so usetarget
verbatim. If not, prepend with%~dp0
just like the current behavior.Related: npm#21
The text was updated successfully, but these errors were encountered: