Skip to content

install: make bun install work in the root of a Windows drive - #43437

Open
robobun wants to merge 3 commits into
mainfrom
robobun/02bbacd8/install-at-drive-root
Open

robobun wants to merge 3 commits into
mainfrom
robobun/02bbacd8/install-at-drive-root

Conversation

@robobun

@robobun robobun commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #29273

Problem

  • On Windows, bun install fails when the project is the root of a drive (C:\package.json): ENOENT: Bun could not find a file, and the code that produces this error is missing a better error. The cwd can be C:\ or a directory below it with no package.json.
  • PackageManager::init (src/install/PackageManager.rs:1509) strips the trailing separator of the cwd. C:\ becomes C:, and read_directory("C:") gets ENOENT.
  • The same strip breaks bun run <script>, bun pm pack and bun publish (bunsh: No such file or directory: C:\C:), and bun link (EINVAL: Invalid argument (symlink())).

Fix

  • init strips with without_trailing_slash_windows_path, which keeps C:\. top_level_dir, the original cwd and INIT_CWD are now absolute.
  • push_package_json spells every root package.json path. The path is a key of the package.json cache, so bun add needs one spelling.
  • run, pack, publish and link keep the root separator. Six join helpers take top_level_dir without the strip.
  • Correct because both strips return the same bytes except for a drive root. On POSIX only //package.json changes, to /package.json. Verified: 8 new Windows tests in test/cli/install/ fail on main and on canary, and pass on this branch (debug build and CI).

Background

  • Windows keeps one current directory for each drive. C: and C:foo are relative to it. Only C:\ names the root.
  • top_level_dir is the project root that bun install changes into. Each install path is joined onto it.
  • subst X: <dir> maps a directory to a drive letter, so a test can run bun in X:\. The new substDrive helper in test/harness.ts does this.
Notes

Which syscall fails

open_dir("C:") goes to normalize_path_windows. C: is not absolute, and it has no separator and no dot, so the name goes to NtCreateFile unchanged with the cwd handle as RootDirectory. NT looks for an entry C: in the cwd. bun_sys::chdir("C:") just before it succeeds, because to_w_dir_path appends a backslash.

Each edit is needed (Windows x64 debug builds, subst root)

build result
main, canary 1.4.3 all 8 new tests fail. bun run hello: bunsh: No such file or directory: Z:\Z:. The others: the ENOENT above
only the init change bun add: panic: assertion failed: crate::is_absolute_windows(cwd) in root_package_json_path (add_remove_with_filter.rs:43). bun pm pack: ENOENT: failed to open root directory: Z:, and with a prepack script bunsh: No such file or directory: Z:\Z:
all but the publish_command.rs change the publish script fails: bunsh: No such file or directory: Z:\Z:
all but the link_command.rs change failed to create junction to node_modules in global dir due to error EINVAL: Invalid argument (symlink())
all but the run_command.rs and INIT_CWD changes bun run hello fails as on main. The postinstall script prints INIT_CWD=Z:
this branch 8 of 8 pass

A release build has no such assertion. There join_abs_string_buf_windows turns a cwd of C: into C:\, so the six join helpers give the same output before and after. The change to select_targets also keeps the --filter subjects consistent with the original cwd, which is now C:\.

The POSIX root

The first revision of this PR made init spell the root path /package.json and left //package.json in updatePackageJSONAndInstall.rs. The package.json cache is keyed by the raw path on POSIX (Windows converts the separators of the key first). So bun add ./dir in / edited one entry and installed from the other: No packages! Deleted empty lockfile, and package.json got "./dir": "./dir". The review caught it. Now init, the runtime manager and updatePackageJSONAndInstall.rs all call push_package_json, so the bytes are equal by construction. A test cannot write to /. By hand, in a container with a writable / (debug build of this branch): bun install, bun install from /dir/sub, bun add ./dir, bun remove, bun update, bun run <script> (cwd /), bun pm pack with a prepack script, and INIT_CWD=/. All correct, and the same as the release build of main for the commands that worked there.

By hand, at the root of the real drive C: (debug build of this branch)

bun install (hoisted and isolated, registry and file: dependencies, a postinstall script, bins), bun add, bun add ./dir, bun remove, bun update, bun update <name>, bun install --frozen-lockfile, bun install from C:\dir\sub, bun add with no package.json, bun pm ls, bun pm bin, bun pm hash, bun why, bun outdated, bun patch, bun pm pack, bun pm pack --destination, bun link with a consumer, bun unlink, bun init -y: all exit 0 with the expected files. Together with #43404 the same holds with workspaces in C:\package.json, including bun add --filter, bun install --filter and bun update -r.

Suites

  • Windows x64 debug build: bun-install (261 pass), bun-run (408 pass), bun-workspaces, bun-add, bun-remove, bun-update, bun-add-filter, bun-add-catalog, bun-pm, bun-pack, bun-publish, bun-link, bun-patch, bun-install-patch: 0 fail.
  • Linux x64 debug build: the same files plus bun-audit, bun-lock, bad-workspace: 0 fail, except tests that need the public network (bitbucket, gitlab) and bun-link "should link dependency without crashing", which compares stdout to a fixed list and gets the stack trace that a debug build prints for the expected failure. Both fail the same way without this change.

Sites with the same pattern that this PR leaves alone

  • strings::without_trailing_slash itself. Many callers append a separator and a name to its result (hoisted_install.rs:376, PackageInstaller.rs:751). For them C: is the correct prefix.
  • add_remove_with_filter.rs:364 and filter_arg.rs:182 take resolve_path::dirname of C:\package.json, which is C:. I found no failure: bun add --filter <root> ./dir spells the path ./dir, and bun run --filter and --workspaces give the same output at C:\ as in a normal directory.
  • FileSystem::top_level_dir_without_trailing_slash() still returns C:. bun init, bun repl and a message of bun patch read it. bun init -y in U:\ writes "name": "u:". That has its own follow-up, because the fix changes what those three commands print.
  • Workspaces at the root of a subst drive abort with assertion failed: !bun_paths::is_absolute(path.slice(buf)), also with this PR and install: resolve the workspaces of a package.json in the filesystem root #43404. The package.json path comes from GetFinalPathNameByHandle and is on the real drive. Fix bun install through subst drives, cross-drive junctions, and symlinked package.json #39361 covers that.

#26192 is a different bug

The duplicate bot closed #29273 against #26192 (R:\code> bun install on an ImDisk RAM disk). I installed ImDisk and ran canary 1.4.3 and this branch in R:\code: both print error: An internal error occurred (EBADF). GetFinalPathNameByHandleW fails with Win32 error 1 on that volume, and get_fd_path in init returns EBADF. This PR does not change that.


no test proof · iteration 0 · platform-specific test(s) that do not run on this machine, deferring to CI, which covers all platforms: test/cli/install/bun-run.test.ts, test/cli/install/bun-publish.test.ts, test/cli/install/bun-pack.test.ts, test/cli/install/bun-link.test.ts, test/cli/install/bun-install.test.ts

`C:\` is the root of drive C. Without the separator it is `C:`, the
current directory of the drive. `C:` is not an absolute path.

`PackageManager::init` removed the separator from a cwd of `C:\`. It then
used `C:` as the project directory. `read_directory("C:")` opens the name
`C:` below the cwd handle and returns ENOENT. The same happened for a cwd
below the root when the package.json is in the root.

- `init` keeps the root separator in the cwd and in each parent it walks
  to. It joins `package.json` onto the directory, so a root gets no
  second separator.
- The package.json path helpers of add, update, audit fix and the hoisted
  installer pass `top_level_dir` to the join as it is. The join asserts an
  absolute cwd in debug builds.
- `bun pm pack`, `bun publish` and `bun link` keep the root separator in
  the package directory. They could not open `C:`, ran scripts in `C:\C:`,
  and could not create the junction.

Fixes #29273
@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: oven-sh/bun/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Essentials

Run ID: aa198e5d-a3d8-4796-b999-a91ed2fd60fe

📥 Commits

Reviewing files that changed from the base of the PR and between 246d037 and 8e7602c.

📒 Files selected for processing (2)
  • src/install/PackageManager.rs
  • src/install/PackageManager/updatePackageJSONAndInstall.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.


Walkthrough

The change updates Windows drive-root path construction, workspace discovery, and CLI path handling. It adds substituted-drive support and regression tests for install, run, link, pack, and publish operations.

Changes

Windows drive-root paths

Layer / File(s) Summary
Platform-aware package path construction
src/install/PackageInstaller.rs, src/install/PackageManager.rs, src/install/PackageManager/updatePackageJSONAndInstall.rs
Package paths preserve drive-root separators, use native joining, and append package.json with NUL termination.
Workspace and CLI path consumers
src/install/PackageManager/*, src/install/audit_fix/package_json_edits.rs, src/runtime/cli/*
Workspace operations and CLI commands use Windows-aware trailing-separator handling.
Drive-root regression coverage
test/harness.ts, test/cli/install/*
Added substituted-drive setup and Windows-only tests for install, run, link, pack, and publish operations from drive roots.

Suggested reviewers: alii, jarred-sumner

Priority: ➖ Normal

Severity of issue fixed: Medium

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #29273 requires Bun commands, including bun install, to work when package.json is at a Windows drive root. The PR preserves drive-root separators during package-manager initialization, packa…
Out of Scope Changes check ✅ Passed The source changes directly address the drive-root failure in issue #29273. The shared substDrive test helper and Windows regression tests support that objective. No unrelated change is demonstrated…
Title check ✅ Passed The title clearly summarizes the primary change: fixing bun install at the root of a Windows drive.
Description check ✅ Passed The description provides detailed problem, fix, scope, verification results, regression coverage, and limitations. It does not use the exact template headings, but it contains the required information…

Comment @coderabbitai help to get the list of available commands.

@robobun

robobun commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator Author

Status

Reproduced on Windows x64 with canary 1.4.3 (26e7a4b) and with a debug build of main. It needs a throwaway machine, because it writes to C:\:

[System.IO.File]::WriteAllText('C:\package.json', '{"name":"fsroot","version":"1.0.0"}')
cd C:\
bun install --ignore-scripts
# ENOENT: Bun could not find a file, and the code that produces this error is missing a better error.

The same happens at the root of a subst drive, so the automated tests use one (run all of it in one shell, a subst drive belongs to the logon session):

mkdir C:\tmp\root; [System.IO.File]::WriteAllText('C:\tmp\root\package.json', '{"name":"fsroot","version":"1.0.0"}')
subst X: C:\tmp\root; cd X:\; bun install; cd C:\; subst X: /d

Tests: bun bd test test/cli/install/bun-install.test.ts -t "project in the root of a drive", and -t "in the root of a drive" for bun-run.test.ts, bun-pack.test.ts, bun-publish.test.ts and bun-link.test.ts. They run on Windows only.

CI (build 118300, head 8e7602c): the diff is green. On both Windows lanes (2019 x64 and 11 aarch64) the five changed test files ran at this commit with 0 failures: bun-install 261 pass, bun-run 408 pass, bun-pack 84 pass, bun-publish 46 pass, bun-link 5 pass. The 8 new drive-root tests are among them.

One job is red, and it does not touch this change:

  • :alpine: 3.23 aarch64 - test-bun: test/bake/deinitialization.test.ts fails on every retry (expect(liveServerWrappers()).toBe(serverWrapperBaseline), expected 1, received 2). It failed the same way on this lane in build 118274 of this PR and in build 118213 of install: resolve the workspaces of a package.json in the filesystem root #43404. It is reported as a break on main. A new CI run cannot make it pass, so I did not start one.

Four other tests failed once and passed on a retry or alone: serve-http2-lifecycle.test.ts, process-stdin.test.ts, s3.test.ts, fetch.tls.wildcard.test.ts. The PR is ready for a maintainer.

PR: #43437

@robobun

robobun commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

Status

  • Opened at 9d9e639 by the backstop, while the pre-PR self-review was still running. The body is the draft from before that review. The rest of the review gets noted here when it lands.
  • One item of the review is already checked: the merge order with the open PRs that edit the same function. The body does not state it yet.

Open PRs in the same function (PackageManager::init; trial merges with git merge-tree at 9d9e639, nothing compiled)

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Beyond the inline findings, I also checked: without_trailing_slash_windows_path on UNC roots (\\server\share\) falls through to the plain strip, which yields a still-valid \\server\share, so push_package_json and the parent walk are unaffected there; the pack/publish abs_workspace_path derivation at POSIX / (now /package.json minus suffix) resolves to /, matching the old value; and the substDrive helper's letter probe, where subst refuses an already-mapped letter, so concurrent tests fall through to the next free one rather than sharing a root.

Extended reasoning...

Five verified findings are being posted inline (POSIX / path-spelling mismatch, INIT_CWD still drive-relative for lifecycle scripts, the same defect left in run_command.rs, the junction/subst workspace-root case, and the unfixed shared top_level_dir_without_trailing_slash helper), so approval is off the table. This note only records what else was examined and ruled out in the diff: UNC-root handling of the new strip helper, the POSIX / derivation in publish_command.rs/pack_command.rs, and the drive-letter probe in test/harness.ts. All new tests are skipIf(!isWindows), so the Windows-only behaviour is exercised only on Windows CI; a human should weigh the sibling call sites the inline comments name.

Additional findings (outside the current diff — GitHub can't attach inline comments there):

  • 🔴 src/install/PackageManager.rs — Lifecycle scripts run by an install at a Windows drive root now get INIT_CWD="C:" (drive-relative) instead of "C:\", a case the base never reached because install failed earlier. configure_env_for_scripts_run at src/install/PackageManager.rs:1096 still uses strings::without_trailing_slash on top_level_dir, which strips the root separator that this PR preserves everywhere else. Fix: build INIT_CWD with the same root-preserving strip (without_trailing_slash_windows_path) so a drive root stays "C:\" while other directories keep losing their trailing separator. The PR keeps the generic strip only at sites that append a separator; this site stores the bare value. [also at: src/install/PackageManager.rs:1097 - nit: lifecycle scripts of a project at a Windows drive root now run, but get INIT_CWD=C: (drive-relative) instead of C:\, which npm and the Bun runtime report.]

    Extended reasoning...

    The PR makes bun install succeed with cwd C:\ (or a subst drive X:). top_level_dir is then C:\ (src/install/PackageManager.rs:1834 set_top_level_dir(child_cwd), child_cwd is the C:\ prefix). Before running lifecycle scripts, configure_env_for_scripts_run at src/install/PackageManager.rs:1093-1100 inserts INIT_CWD when not already set, with value strings::without_trailing_slash(top_level_dir). bun_core::strings::without_trailing_slash (src/bun_core/lib.rs:2309) strips any trailing / or \ while len > 1, so C:\ becomes C:. npm and the rest of this PR treat C:\ as the root; C: is the current directory of drive C, so a postinstall or prepare script that does path.join(process.env.INIT_CWD, 'file') builds C:file, and a script that changes drive first resolves it against another directory. On the base branch this env value is never produced at a drive root because init fails with ENOENT before scripts run, so this is a new output of the merged code. The three other remaining…

    Verification: normal — triggers when bun install runs at a Windows drive root (cwd C:\ or a subst drive) and a lifecycle script reads INIT_CWD; a path this PR newly makes reachable (the base failed with ENOENT before any script ran). Mechanism verified in the code: - src/install/PackageManager.rs:1520 now computes top_level_dir_no_trailing_slash =… | normal — triggers when bun install/add`/etc.…

  • 🟣 src/runtime/cli/run_command.rs — pre-existing: a user running bun run <script> in a project whose package.json sits at a Windows drive root still gets a shell failure, the same one this PR fixes for bun pm pack and bun publish. run_command.rs:2438 builds package_json_dir with strings::without_trailing_slash(without_suffix_comptime(path.text, "package.json")), which turns C:\ into the drive-relative C:, and passes it as the script cwd. Fix: keep the root separator in every script-cwd derivation, i.e. use without_trailing_slash_windows_path here as at pack_command.rs:2136 and publish_command.rs:674, which covers the 3 sites. Same pattern at 3 sites (run_command.rs:2438, pack_command.rs:2136, publish_command.rs:674).

    Extended reasoning...

    The PR description reports that with a cwd of Z: the shell prints bunsh: No such file or directory: Z:\Z: for the prepack script, and fixes that by switching pack_command.rs:2136 and publish_command.rs:674 to without_trailing_slash_windows_path. It lists other left-alone sites but not this one. The resolver builds the package.json path with r_fs.abs(&[input_path, b"package.json"]) (src/resolver/package_json.rs:384), so for a project at C:\ package_json.source.path.text is C:\package.json. run_command.rs:2437-2441 strips package.json giving C:\, then strings::without_trailing_slash (bun_core/lib.rs:2309, no drive-root guard) gives C:. That value is passed as cwd to run_package_script_foreground_with_shell_path (run_command.rs:2456-2466 and the following call for the main script), which hands it to MiniEventLoop::init_global(.., Some(cwd)) and Interpreter::init_and_run_from_source(.., Some(cwd)) at run_command.rs:326-341. This is the identical function pack_command.rs:2965 run_lifecycle_script uses, so the same Z:\Z: failure occurs. Trigger:…

    Verification: pre-existing (the base fails the same way; the PR does not touch run_command.rs, but it fixes the identical pattern in two sibling sites and REVIEW.md asks for the whole class). Trigger: bun run <script> (Bun shell, the default) when the enclosing package.json is at a Windows drive root (C:\package.json). Mechanism verified: /home/claude/bun/src/runtime/cli/run_command.rs:2437-2441 computes…

  • 🟣 src/install/PackageManager.rs — Windows users whose workspace root is reached through a junction, symlink or subst drive get the member installed as a standalone project instead of the workspace root, with no error in release builds. PackageManager.rs:1707 takes the root package.json path from get_fd_path, which returns the real drive path, while child_cwd at :1675 keeps the aliased path; relative_normalized at :1794 then yields a ..-prefixed path that never equals a workspace key, so :1814 never runs. Fix: compare against a canonical form of child_cwd (realpath of the cwd fd) or compare the dirname of the opened root package.json against the walk's own parent.

    Extended reasoning...

    The author defers this to #39361 and says a debug assertion fires. In release the debug_assert in relative_normalized is compiled out, so nothing fires; the loop at :1786 finds no match, break at :1826 exits, and :1835 sets top_level_dir to child_cwd, the member directory. The install then runs with the member's package.json as the root: its own node_modules, its own lockfile, no hoisting, no catalog resolution. The new drive-root tests use subst, which is exactly this alias shape, and the PR notes workspaces at a subst root abort, so the code path is reached in this PR's own fixture. Population: Windows developers with projects under subst drives, junctions to another volume, or Dev Drive mount points, and every bun install run from a member directory. The base had the same mismatch but could not reach it from a drive root; this PR opens the drive-root path and leaves the mismatch in place. Remedy: resolve child_cwd through the same get_fd_path canonicalization before relative_normalized.

    Verification: pre-existing — triggered when the workspace root is reached through a junction/symlink/subst alias so that the aliased cwd and the handle's real path differ. Mechanism verified in /home/claude/bun/src/install/PackageManager.rs: json_path comes from bun_sys::get_fd_path(json_file.handle, ...) (:1707-1711, real/final path), while child_cwd is a slice of the getcwd-derived buffer (:1675,…

Comment thread src/install/PackageManager.rs
Comment thread src/runtime/cli/link_command.rs
…ipts

- `bun add`, `remove`, `update` and `link <pkg>` edit the package.json cache
  entry keyed by `original_package_json_path`. They then install from the
  entry keyed by a path that updatePackageJSONAndInstall.rs builds. With the
  project in `/` the first was `/package.json` and the second
  `//package.json`, so the install did not see the edit. Both paths now come
  from `push_package_json`. The runtime manager uses it too.
- `INIT_CWD` for lifecycle scripts keeps the separator of a drive root.
- `bun run <script>` keeps the separator of a drive root for the cwd of the
  script. It failed with `bunsh: No such file or directory: C:\C:`.
Comment thread src/install/PackageManager.rs Outdated
Comment thread src/install/PackageManager/updatePackageJSONAndInstall.rs Outdated
@robobun

robobun commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

Replies to the findings of the review that have no inline thread:

  • INIT_CWD is C: in a drive root. Confirmed on Windows (INIT_CWD=Z: from a postinstall script). Fixed in 246d037: configure_env_for_scripts_run uses the strip that keeps the root. The two bun install tests now assert the line INIT_CWD=Z:\.
  • bun run <script> in a drive root. Confirmed on canary 1.4.3: bunsh: No such file or directory: Z:\Z:, from the root and from a directory below it. Fixed in 246d037 (run_command.rs, the same change as in pack_command.rs and publish_command.rs). The new test in test/cli/install/bun-run.test.ts runs a pre script and a pwd script from both directories. It fails on main and on the first revision of this PR.
  • A workspace root reached through a junction, a symlink or a subst drive. This is not a drive root problem. It exists on main for every aliased workspace root, and Fix bun install through subst drives, cross-drive junctions, and symlinked package.json #39361 changes that comparison. This PR does not touch it.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I re-reviewed the two new commits and found no bugs; since this rewrites the cwd/package.json spelling in PackageManager::init and the new tests only run on Windows, a human look is still worthwhile.

What was reviewed:

  • The POSIX / cache-key mismatch from my earlier comment: init, init_with_runtime_once and updatePackageJSONAndInstall.rs now all go through push_package_json, and this_cwd stays a prefix of the buffer across the truncate + re-push, so the keys match by construction.
  • The parent-directory walks: bun_core::dirname returns None at C:\ and /, so the loops terminate; join_abs_string_buf_z::<Auto> tolerates a cwd with or without a trailing separator, so the six call sites that dropped the strip produce the same bytes as before except at a drive root.
  • The detached ZStr::from_raw borrow in init: the Vec capacity still covers the longest push_package_json result, so no reallocation invalidates it.
  • substDrive: subst fails on an in-use letter, so concurrent tests fall through to the next letter; drive disposal is registered before the assertions.
Extended reasoning...

Overview

The diff replaces strings::without_trailing_slash(top_level_dir()) with bun_paths::string_paths::without_trailing_slash_windows_path (keeps C:\) or passes top_level_dir() straight into join_abs_string_buf at eleven Rust sites across src/install/ and src/runtime/cli/. PackageManager.rs gains a push_package_json helper used by init, init_with_runtime_once and updatePackageJSONAndInstall.rs, and its two parent-directory walks now use join_abs_string_buf_z::<platform::Auto> into a pooled buffer instead of manual byte copies. Tests add a Windows-only substDrive harness helper and eight Windows-gated tests across install, link, pack, publish and run.

Security risks

None specific to this change: the paths come from getcwd and the resolver's DirnameStore, not from user-controlled package data. The one unsafe (the detached ZStr::from_raw over original_package_json_path_buf) pre-exists; I checked that the Vec::with_capacity(len + "/package.json".len() + 1) still covers the largest push_package_json result (separator + 12 bytes + NUL), so no reallocation happens before the pointer is reassigned at the truncate site, and original_cwd is not read after the buffer's tail is rewritten (only original_cwd_clone is).

Level of scrutiny

Moderate-to-high. PackageManager::init is the entry point for every install subcommand, the cache-key coincidence between original_package_json_path and the root path in updatePackageJSONAndInstall.rs was already broken once in the first revision, and the tests that prove the fix are skipIf(!isWindows) so Linux CI cannot exercise them. I verified from source that bun_core::dirname returns None for C:\ and / (so the walks terminate), that without_trailing_slash_windows_path degrades to without_trailing_slash on unix (so POSIX behaviour is unchanged except //package.json becoming /package.json, now consistently at every site), that the POSIX join body inserts a separator only when the cwd does not already end in one, and that the Windows join's debug_assert!(is_absolute_windows(cwd)) is now satisfied by C:\ where C: would have tripped it. The .last().is_some_and(...) in push_package_json does not match any pattern in the byte-search source lint. Module aliases (path::string_paths, strings::paths) resolve in the files that use them.

Other factors

The commit after my previous review (246d037) addresses the POSIX root cache-key mismatch I raised; the pre-existing FileSystem::top_level_dir_without_trailing_slash still returning C: for init/repl/patch is explicitly deferred to a follow-up in the PR description. Remaining sibling sites (hoisted_install.rs:376/429, PackageInstaller.rs:750) append SEP themselves, so a bare C: is the right prefix there. The bug hunt exited on dry_streak with no findings. I could not run the Windows tests from this Linux checkout, which is the main reason for deferring rather than approving.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bun completely fails when working with drive root

1 participant