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: don't assume cygpath is available #117

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Conversation

davhdavh
Copy link
Contributor

@davhdavh davhdavh commented Oct 5, 2023

Fixes "cygpath command not found"

References

There are over 1000 bugs on github with "cygpath command not found"

And I am guessing a large part of these is simply because this script generator assumes cygpath is installed.

@davhdavh davhdavh requested a review from a team as a code owner October 5, 2023 08:50
@wraithgar
Copy link
Member

What should actually happen here? If uname contains *CYGWIN*|*MINGW*|*MSYS* but cygpath isn't accessible?

@davhdavh
Copy link
Contributor Author

davhdavh commented Oct 6, 2023

The following code already checks if node is in current path or in PATH. That is more than sufficient under normal circumstances.

I added a local cygpath (as an alternative fix) in C:\Program Files\nodejs that just has this amazing implementation:

#!/bin/sh

echo "$2"

ie, a noop operation (assuming it was called with -w path as we do here)

@wraithgar
Copy link
Member

It looks like npm run snap needs to be ran, and those changes included in this PR.

@wraithgar wraithgar merged commit 3bdb518 into npm:main Oct 18, 2023
26 checks passed
@github-actions github-actions bot mentioned this pull request Oct 18, 2023
@davhdavh davhdavh deleted the patch-1 branch October 18, 2023 14:48
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