-
-
Notifications
You must be signed in to change notification settings - Fork 769
fix: remove temporary files after install #6948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| else | ||
| tar -xf "$cache_file" | ||
| fi | ||
| mv mise/bin/mise "$install_path" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is going to fail if it's on a different mount, though hmm, seems it was doing this before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least on Linux, I've never seen a system where this doesn't work
From the POSIX specification:
- [3] mv will try to use rename to move. If it works, it will stop here. If on different file system it will get a EXDEV error and continue to next steps
- [6] It will copy the file to the destination
- [7] It will remove the source file
|
bugbot run |
| tar -xf "$cache_file" | ||
| fi | ||
| mv mise/bin/mise "$install_path" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Cross-Mount mv Breaks Installation (Bugbot Rules)
The mv command fails when extract_dir and install_path are on different filesystem mounts. Since extract_dir is created in /tmp via mktemp -d and install_path defaults to $HOME/.local/bin, this cross-mount scenario is common and causes installation failure with "Invalid cross-device link" errors.
|
|
||
| # cleanup | ||
| rm -rf "$download_dir" | ||
| rm -rf "$extract_dir" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Cleanup deletes active directory, causing system instability.
The cleanup removes extract_dir while still being inside it (from cd "$extract_dir" at line 266). Deleting the current working directory can cause shell errors or leave processes in an invalid state on some systems, potentially causing the subsequent success message or shell session to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
b4baaa0 to
6d0cf54
Compare
### 📦 Registry - add xcsift by @alexey1312 in [#6923](#6923) - add tools: magika & xxh by @IceCodeNew in [#6909](#6909) - add aliases to aqua-backend tools by @IceCodeNew in [#6910](#6910) ### 🚀 Features - **(tasks)** add `mise task validate` command for task validation by @jdx in [#6958](#6958) ### 🐛 Bug Fixes - **(cli)** intercept --help flag to show task help instead of executing task by @jdx in [#6955](#6955) - remove temporary files after install by @vmeurisse in [#6948](#6948) ### 📚 Documentation - **(snapcraft)** update `summary` & `description` shown in snapcraft.io by @phanect in [#6926](#6926) - Change package example in go.md by @nachtjasmin in [#6862](#6862) - paranoid mode does not untrust global config by @iloveitaly in [#6952](#6952) ### 📦️ Dependency Updates - lock file maintenance by @renovate[bot] in [#6932](#6932) ### New Contributors - @iloveitaly made their first contribution in [#6952](#6952) - @nachtjasmin made their first contribution in [#6862](#6862) - @IceCodeNew made their first contribution in [#6910](#6910) - @alexey1312 made their first contribution in [#6923](#6923) ## 📦 Aqua Registry Updates #### New Packages (6) - [`CrociDB/bulletty`](https://github.com/CrociDB/bulletty) - [`Gaurav-Gosain/tuios`](https://github.com/Gaurav-Gosain/tuios) - [`ck-zhang/reddix`](https://github.com/ck-zhang/reddix) - [`hokaccha/spannerdef`](https://github.com/hokaccha/spannerdef) - [`lasantosr/intelli-shell`](https://github.com/lasantosr/intelli-shell) - [`zerocore-ai/microsandbox`](https://github.com/zerocore-ai/microsandbox) #### Updated Packages (4) - [`cue-lang/cue`](https://github.com/cue-lang/cue) - [`flutter/flutter`](https://github.com/flutter/flutter) - [`phiresky/ripgrep-all`](https://github.com/phiresky/ripgrep-all) - [`topgrade-rs/topgrade`](https://github.com/topgrade-rs/topgrade) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Bump to 2025.11.4 with aqua-registry additions/updates, dependency/tooling refresh, updated completions/docs, and packaging/version files. > > - **Release/Versioning**: > - Bump to `2025.11.4` in `Cargo.toml`, `default.nix`, `packaging/rpm/mise.spec`, `snapcraft.yaml`, and `README.md`. > - **Aqua Registry**: > - *New packages*: `CrociDB/bulletty`, `Gaurav-Gosain/tuios`, `ck-zhang/reddix`, `hokaccha/spannerdef`, `lasantosr/intelli-shell`, `zerocore-ai/microsandbox` (owner change + aliases). > - *Updates*: `cue-lang/cue` (version rules), `flutter/flutter` (channelized URLs), `phiresky/ripgrep-all` (version/asset rules), `topgrade-rs/topgrade` (extensive version/asset overrides). > - **Dependencies/Tooling**: > - `Cargo.lock`: bump `aws-lc-*`, `hyper 1.8.0`, `indicatif 0.18.3`, `luajit-src`, `num-bigint-dig`, `crypto-common`, `usage-lib`, etc. > - `mise.lock`: update `bun`, `cargo-binstall`, `cargo-edit`, `node`, `pre-commit`, `usage-cli`. > - **Completions**: > - Update usage spec cache filenames to `usage__usage_spec_mise_2025_11_4.spec` in `completions/*`. > - **Docs**: > - Add `CHANGELOG.md` entry for `2025.11.4`; bump stars to `21.3k` in `docs/.vitepress/stars.data.ts`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a1e62ee. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Summary
Current install script is creating 2 temporary folders to download and extract the tarball. When using wget, it also creates 2 files for the log (one of witch is never used).
On an amd64 machine, that is 23MB of wasted space.
This PR remove those files after use.
Test plan
Tested manually in a blank Debian container with just curl/wget added
Note
Cleans up temporary download/extract directories and wget log files, refactoring download flow to use passed dirs and removing unused temps.
packaging/standalone/install.envsubst):wgetstderr log file.download_file:download_dirparameter; writes file there instead of creating its own temp dir.extract_dirfor untar, enabling cleanup.Written by Cursor Bugbot for commit b4baaa0. This will update automatically on new commits. Configure here.