Skip to content

Conversation

@vmeurisse
Copy link
Contributor

@vmeurisse vmeurisse commented Nov 11, 2025

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.

  • Standalone installer (packaging/standalone/install.envsubst):
    • Clean up temporary resources:
      • Remove temporary download directory and extraction directory after use.
      • Delete temporary wget stderr log file.
    • Refactor download_file:
      • Accepts download_dir parameter; writes file there instead of creating its own temp dir.
    • Extraction flow:
      • Use explicit extract_dir for untar, enabling cleanup.
    • Minor: remove unused temp file creation in checksum fetch path.

Written by Cursor Bugbot for commit b4baaa0. This will update automatically on new commits. Configure here.

jdx
jdx previously requested changes Nov 11, 2025
else
tar -xf "$cache_file"
fi
mv mise/bin/mise "$install_path"
Copy link
Owner

@jdx jdx Nov 11, 2025

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

Copy link
Contributor Author

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

@jdx
Copy link
Owner

jdx commented Nov 11, 2025

bugbot run

tar -xf "$cache_file"
fi
mv mise/bin/mise "$install_path"

Copy link

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.

Fix in Cursor Fix in Web


# cleanup
rm -rf "$download_dir"
rm -rf "$extract_dir"
Copy link

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.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@jdx jdx enabled auto-merge (squash) November 12, 2025 13:20
@jdx jdx self-requested a review November 12, 2025 13:20
@jdx jdx merged commit 00600c7 into jdx:main Nov 12, 2025
27 checks passed
jdx pushed a commit that referenced this pull request Nov 13, 2025
### 📦 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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants