-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pwsh.exe path linking fails if package directory is on a different disk to home directory #18
Comments
Just hit the same problem today. |
The culprit is either: A) Our Line 266 in 0f7440d
B) The third-party Can you try to narrow this down and see if it's a bug in cmd-shim? You should be able to create a minimal reproduction where you use cmd-shim's API to create a shim from one drive to another. See if the output is broken in the same way. |
Looks like this is, indeed, a cmd-shim bug. |
It appears that cmd-shim is not receiving updates, but there is a fork that's used by pnpm and yarn. https://www.npmjs.com/package/@zkochan/cmd-shim If anyone wants to fix this (@weshaggard or @antmarti-microsoft?) I recommend submitting a PR that switches to using @zkochan/cmd-shim. See if that fixes the problem. If not, we can submit a PR to https://github.com/pnpm/cmd-shim. I unfortunately don't have the bandwidth to fix this now, but I'll merge a publish a PR. |
If/when switching implementation, is there any reason to prefer @zkochan/cmd-shim over according to the network diagram npm/cmd-shim seems to be the fork most recently/activly maintained |
I tried a quick look, but thus far I can't build or test based on my initial look at the instructions. there seems to be a circular reference Im willing to give a hand , but would need to have a stable baseline to start from |
OK , I gave up on getting the tests to provide any predictive or reliable results.
However on my machine is seems to give no indication at all weather or not the solution will actually work.
happy to share what I've tried; but this is not working , and for now this is what I can do. |
The tests have been updated to run on Github Actions in mocha, not pester. Pester was more trouble than it was worth. If anyone wants to take another stab at fixing this bug, it should be easier now. |
Replaced by #24 to more concisely describe the necessary fix to newcomers. |
On install, .\node_modules\pwsh\bin\pwsh and .\node_modules\pwsh\bin\pwsh.cmd contain a link to pwsh.exe in the user's home directory.
If the package.json is on a different disk drive to the user's home directory, this link is malformed - it assumes the path to the home directory is a relative path. For example, when running
npm install
with a package.json file on my E:, I see the following:.\node_modules\pwsh\bin\pwsh.cmd:
.\node_modules\pwsh\bin\pwsh:
The text was updated successfully, but these errors were encountered: