fix(server) Avoid modifying path resolution for executables on MacOS #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
spawn-rx
follows symlinks when resolving executables, which breaks version manager shims on macOS. For example, when using Volta,bun
incorrectly resolves tovolta-shim
instead of thebun
executable. This PR works around the issue by bypassingspawn-rx
's path resolution on non-Windows platforms.Closes #114
How Has This Been Tested?
bun
on macOSBreaking Changes
None. This restores expected behavior on macOS while maintaining existing Windows functionality.
Types of changes
Checklist
Additional context
This could be a temporary fix while we investigate the underlying
spawn-rx
path resolution behavior. We may want to upstream a fix that handles Windows PATH resolution without affecting Unix shims.To Reproduce
Steps to reproduce the behavior:
bun
ornode
.Expected behavior
The inspector should spawn the command as entered in the UI.
Logs
I'm getting this error:
Volta error: 'volta-shim' should not be called directly. Please use the existing shims provided by Volta (node, yarn, etc.) to run tools.
Note that the command
bun
is resolved incorrectly.Edit: rephrase to be more clear and concise, add additional context