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 try to chmod unlinked files #80

Merged
merged 1 commit into from
Jul 11, 2023
Merged

fix: don’t try to chmod unlinked files #80

merged 1 commit into from
Jul 11, 2023

Conversation

remcohaszing
Copy link
Contributor

linkGently would return true if a link target had been visited before. linkBin would then chmod the link to, regardless of whether this file exists. This causes npm install to fail if multiple packages link to a non-existent bin with the same name.

By returning false in linkGently, linkBin no skips the chmod on the non-existent file.

References

Fixes npm/cli#4597

`linkGently` would return true if a link target had been visited before.
`linkBin` would then chmod the link `to`, regardless of whether this
file exists. This causes `npm install` to fail if multiple packages link
to a non-existent bin with the same name.

By returning false in `linkGently`, `linkBin` no skips the chmod on the
non-existent file.

Closes npm/cli#4597
@remcohaszing remcohaszing requested a review from a team as a code owner July 11, 2023 14:18
@wraithgar
Copy link
Member

Not sure why CI didn't kick off here. Tests pass for me locally. I'm gonna close/reopen to see if that makes the CI tests start.

@wraithgar wraithgar closed this Jul 11, 2023
@wraithgar wraithgar reopened this Jul 11, 2023
@wraithgar wraithgar mentioned this pull request Jul 11, 2023
@wraithgar wraithgar self-assigned this Jul 11, 2023
@wraithgar
Copy link
Member

Thank you. Will land this after #82

@wraithgar wraithgar merged commit 08f8981 into npm:main Jul 11, 2023
19 checks passed
@github-actions github-actions bot mentioned this pull request Jul 11, 2023
@remcohaszing remcohaszing deleted the skip-chmod-failed-link branch July 11, 2023 16:21
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.

[BUG] Install fails if "bin" script doesn't exist
2 participants