cmd-shim icon indicating copy to clipboard operation
cmd-shim copied to clipboard

Support cross-drive linking

Open jddxf opened this issue 8 years ago • 6 comments

Currently we cannot link a file to a different drive. E.g. cmdShim('C:\\a.js', 'D:\\a', () => {}) would generate files containg "$basedir/C:/a.js" or "%~dp0\C:\a.js", which are broken due to the unresolvable paths.

In this case, we can use an absolute path instead, i.e. using "C:/a.js" rather than "$basedir/C:/a.js".

If this is a valid use case, I'd like to work on it.

jddxf avatar Apr 03 '17 13:04 jddxf

Please do - I am experiencing this issue also

stacy-rendall avatar Apr 24 '18 07:04 stacy-rendall

Please do - I am experiencing this issue also

yasz avatar Jan 03 '19 03:01 yasz

Users of npm.im/pwsh reported this bug recently: https://github.com/cspotcode/npm-pwsh/issues/18

cspotcode avatar Jul 19 '19 02:07 cspotcode

Patch welcome for this. Or I'll get to it in a few weeks, probably.

isaacs avatar Aug 15 '19 19:08 isaacs

Note: comments on this issue that are not related to cross-drive linking will be deleted, including comments about deleting comments. Please take other discussions elsewhere, or feel free to email me at [email protected]. This issue will be locked if it becomes a problem.

Thanks.

isaacs avatar Aug 15 '19 20:08 isaacs

Just leaving a note here that it's likely that this will be a breaking change if implemented. (That's not to say it shouldn't be implemented, but just that it'll require a semver major bump, and an update to read-cmd-shim, since the path will no longer contain %~dp0 or %dp0%.)

isaacs avatar Aug 16 '19 00:08 isaacs