Uh oh!
There was an error while loading. Please reload this page.
fix: resolve node_modules/.bin from nodeOptions.cwd instead of current process cwd - #166
Merged
Merged
Conversation
iirojforce-pushed
the
resolve-node-modules-cwd
branch
from
August 19, 2026 14:51
326e89e to
c474647ComparenodeOptions.cwd instead of real process cwdnode_modules/.bin from nodeOptions.cwd instead of current process cwd| let currentPath = cwd; | ||
| let currentPath = | ||
| cwd instanceof URL ? fileURLToPath(cwd, {windows: false}) : cwd; |
There was a problem hiding this comment.
probably better the other way
Suggested change
| cwdinstanceofURL ? fileURLToPath(cwd,{windows: false}) : cwd; | |
| typeofcwd==='string' ? cwd : fileURLToPath(cwd,{windows: false}); |
ContributorAuthor
There was a problem hiding this comment.
Makes sense, updated. Also added some main_test.ts cases and almost missed the async exec version…
iirojforce-pushed
the
resolve-node-modules-cwd
branch
from
August 19, 2026 18:06
c474647 to
cae38c1Compareiiroj
marked this pull request as ready for review
August 19, 2026 18:07
iiroj
commented
Aug 19, 2026
| const opts = {...defaultSyncOptions, ...options}; | ||
| const cwd = getCwd(); | ||
| const nodeOptions: SpawnSyncOptions = { | ||
| windowsHide: true, |
ContributorAuthor
There was a problem hiding this comment.
Should probaby use the default options here for consistency, since this is the only value:
Suggested change
| windowsHide: true, | |
| ...defaultNodeOptions, |
ContributorAuthor
There was a problem hiding this comment.
Went maybe a bit overboard with refactoring all the nodeOptions types to use satisfies…
43081j
reviewed
Aug 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
…rrent process cwd When `tinyexec` is configured with the `nodeOptions.cwd` option, the local `node_modules/.bin` directories should be resolved and added to `PATH` starting from that directory, instead of the directory where `tinyexec` itself is running.
iirojforce-pushed
the
resolve-node-modules-cwd
branch
from
August 24, 2026 13:48
a9682d8 to
26c8bfbCompare43081j
reviewed
Aug 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
43081j
approved these changes
Aug 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When
tinyexecis configured with thenodeOptions.cwdoption, the localnode_modules/.bindirectories should be resolved and added toPATHstarting from that directory, instead of the directory wheretinyexecitself is running.