Skip to content
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

fix: windows use whichSync doesn't find .cmd executables in the PATH #6

Merged
merged 4 commits into from
May 4, 2024
Merged

fix: windows use whichSync doesn't find .cmd executables in the PATH #6

merged 4 commits into from
May 4, 2024

Conversation

kingsword09
Copy link
Contributor

No description provided.

Copy link
Owner

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Would you be able to add a test in mod.test.ts to ensure this doesn't regress in the future?

@kingsword09
Copy link
Contributor Author

kingsword09 commented Jun 27, 2023

Thanks! Would you be able to add a test in mod.test.ts to ensure this doesn't regress in the future?

When I use Deno.Command to execute the npx command on the windows platform, I use which to obtain the execution environment. It is possible to use the asynchronous method of which, but it does not work when using whichSync. Then I found that it is caused by the reason for judging the sequence, that is, in which Different from whichSync judges the location, whichSync will find npx and judge isFile to return instead of fetching npx.CMD.

@dsherret
Copy link
Owner

Ok, would you be able to add tests for this? I can do it sometime otherwise.

@dsherret dsherret merged commit 6cdc0fb into dsherret:main May 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants