Support cross-drive linking

Open
#21 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
cli

Research direction

Start at the cmdShim entry point and reproduce the cross-drive example using C:\a.js and D:\a. Trace how the generated files construct the target path, then verify that cross-drive links use an absolute path such as C:/a.js and no longer contain the unresolved $basedir or %~dp0 prefix.

Written by the indexing model from the issue text.

Description

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.

Dominant language
JavaScript
Stars
81
Forks
51
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from npm/cmd-shim

All issues in npm/cmd-shim

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.