cmd-shim
cmd-shim copied to clipboard
Support cross-drive linking
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.
Please do - I am experiencing this issue also
Please do - I am experiencing this issue also
Users of npm.im/pwsh reported this bug recently: https://github.com/cspotcode/npm-pwsh/issues/18
Patch welcome for this. Or I'll get to it in a few weeks, probably.
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.
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%.)