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
feat(install): add file locking to prevent concurrent installation issues (#289)
Add file locking to prevent race conditions in package manager installation
Added file-based locking to ensure atomic operations during package manager downloads, preventing concurrent processes from conflicting when installing the same package manager version.
close#140
## Changes
- Added file-based locking using `fs4` crate to synchronize critical operations
- Added NFS filesystem detection to skip locking on NFS where it may be unreliable
- Improved error logging in `remove_dir_all_force` to provide better debugging information
- Added `RUST_BACKTRACE=1` to CLI E2E tests for better error diagnostics
- Added `RUST_*` to passthrough environment variables in tools utils
## Why
This change prevents race conditions when multiple processes attempt to install the same package manager version simultaneously. The file lock ensures that the remove and rename operations are performed atomically, avoiding conflicts between concurrent installation attempts.
0 commit comments