You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pushed a follow-up that replaces the new test's direct Path::exists() calls with sys.fs_exists(...), fixing the clippy disallowed_methods lint while keeping the regression assertions unchanged.
Pushed a CI setup fix for the failing test unit release linux-x86_64 job. The job was failing before tests because the runner's preinstalled Azure CLI apt source returned 403 during apt-get update; the workflow now disables that unrelated source before installing LLVM packages.
The core fix looks correct and well-tested. normalize_bin_name() is applied consistently at all three relevant points — collision detection in add(), within-run dedup in for_each_entry(), and the actual symlink/Windows-shim setup in set_up_bin_entry() — so the normalized name flows through everywhere it needs to (including warn_missing_entrypoint). The repro case (@eslint/config-inspector → config-inspector) resolves to the same name pnpm produces, and the String bin branch stays consistent since it already basenames via default_bin_name().
Test coverage is strong: the unix test asserts both that .bin/config-inspector is created and that no .bin/@eslint subdir leaks, which directly pins the bug.
A few notes:
Scope: please split out the CI change. This PR also bundles an unrelated CI workflow change (ci.ts + the regenerated blocks in ci.generated.yml disabling an azure-cli apt source that returns 403). That has nothing to do with npm bin names and should be its own PR to keep history focused.
Minor — edge cases.normalize_bin_name returns "" for inputs like "" / "/", and passes bare ".."/"." through unchanged (embedded separators are stripped, so "../foo" → "foo", but ".." alone survives). Not a regression — these were already mishandled and stripping separators actually reduces the path-escape surface — but an early guard or a comment noting these are out of scope would make intent explicit.
Nit. The intermediate binding in normalize_bin_name can be dropped (rename the trimmed binding and unwrap_or(trimmed)), purely cosmetic.
Net positive on security too: taking the basename closes the previous write-outside-.bin path. Approve on the substance — just please pull the CI change into a separate PR.
Pushed 036363b9208c to address this: the unrelated CI workflow workaround is removed from this PR, and normalize_bin_name() now uses the trimmed binding directly with a short comment clarifying that empty/special-name validation is outside this basename normalization.
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
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.
Closes #35553.
Summary
binmap entry names by using the last non-empty path segment, matching npm/pnpm behavior for names like@eslint/config-inspector..binsymlink and Windows shim setup so separators are not interpreted as directories.Validation
cargo fmt -p deno_npm_installercargo test -p deno_npm_installer bin_entries