deno
7a7b8d6a - fix(install): regenerate lockfile with --force on global install (#33970)

Commit
148 days ago
fix(install): regenerate lockfile with --force on global install (#33970) ## Summary Fixes #33934. When `deno install --global --force` (or `--reload`) was used, the auto-generated lockfile at `<bin>/.<name>/deno.lock` still pinned the old version, so version resolution returned the previously locked version instead of the latest. This change removes the stale lockfile before re-running resolution in `setup_config_dir` when `--force` or `--reload` is specified. The user is explicitly asking for a fresh install in those cases, so honoring a stale auto-generated lockfile is a footgun. ## Test plan - [x] Added `install_force_regenerates_lockfile` unit test - [x] Added `install_reload_regenerates_lockfile` unit test - [x] `cargo build --bin deno` passes - [x] `./tools/format.js` + `./tools/lint.js` clean --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Author
Parents
Loading