Skip to content

getcwd: report CurrentWorkingDirectoryUnlinked from a deleted cwd again - #32357

Merged
dylan-conway merged 3 commits into
mainfrom
farm/fecdab1d/fix-cwd-unlinked-error
Aug 15, 2026
Merged

getcwd: report CurrentWorkingDirectoryUnlinked from a deleted cwd again#32357
dylan-conway merged 3 commits into
mainfrom
farm/fecdab1d/fix-cwd-unlinked-error

Produce CurrentWorkingDirectoryUnlinked only from bun_core::getcwd

4c99108
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 15, 2026 in 18m 40s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/cli/Arguments.rs:837 bun install --cwd . from a deleted cwd still prints the generic ENOENT fallback

Annotations

Check warning on line 837 in src/runtime/cli/Arguments.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

bun install --cwd . from a deleted cwd still prints the generic ENOENT fallback

The PR description says "Every other bun_sys::getcwd caller handles its error locally," but bun_install's own `--cwd` parser at `src/install/PackageManager/CommandLineArguments.rs:1554` still calls `bun_sys::getcwd(&mut buf[..])?` and propagates ENOENT to `handle_root_error` — package-manager commands skip `arguments::parse` because `USES_GLOBAL_OPTIONS[InstallCommand]` is false. It's the structural twin of the `--cwd` site fixed here, so `bun install --cwd .` from a deleted directory still prin