Repository navigation
feat(install): keep identity-layout installations in a shorter directory on Windows #13952
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
Merged
jdx
merged 10 commits into
claude/project-thread-htk77e
from
claude/project-thread-htk77e-1-windows-store
Oct 5, 2026
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c5f120a
feat(install): keep identity-layout installations in a shorter store …
jdx cfdffff
fix(install): absolute links into a relative store, store-aware tests…
jdx 703a944
fix(install): sibling store links through a symlinked installs dir, v…
jdx 2b10709
fix(install): name a sibling store by its physical name in version links
jdx 5cf4d93
fix(install): keep a sibling store link recognizable through symlinke…
jdx 32a9ef4
fix(install): ignore an install store inside the installs directory
jdx 49d2941
fix(install): tell whether the install store is inside the installs d…
jdx cabcd8f
fix(install): lock an installation in its store, so installs director…
jdx c3b1258
fix(install): count only installations in a separate install store as…
jdx 4785872
fix(install): recognize installation names lengthened after a collisi…
jdx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #!/usr/bin/env bash | ||
| # A separate install store (the default on Windows, where it is <data>\i): the | ||
| # installations live in MISE_INSTALL_STORE_DIR, while the version links, runtime | ||
| # aliases and the catalog stay in the installs directory. | ||
| export MISE_EXPERIMENTAL=1 | ||
| export MISE_INSTALL_LAYOUT=identity | ||
| export MISE_INSTALL_STORE_DIR="$MISE_DATA_DIR/i" | ||
|
|
||
| installs="$MISE_DATA_DIR/installs" | ||
| store="$MISE_INSTALL_STORE_DIR" | ||
|
|
||
| assert "mise install dummy@1.1.0 dummy@2.0.0" | ||
| dir_1="$(mise where dummy@1.1.0)" | ||
| dir_2="$(mise where dummy@2.0.0)" | ||
| name_1="$(basename "$dir_1")" | ||
| name_2="$(basename "$dir_2")" | ||
|
|
||
| echo "=== installations go in the store ===" | ||
| assert_matches "mise where dummy@1.1.0" "^$store/dummy-[a-z2-7]{8}\$" | ||
| assert "test -f '$dir_1/.mise-install.toml'" | ||
| assert "test ! -e '$installs/$name_1'" | ||
|
|
||
| echo "=== links, aliases and the catalog stay in the installs directory ===" | ||
| assert "readlink '$installs/dummy/1.1.0'" "../../i/$name_1" | ||
| assert "readlink '$installs/dummy/2.0.0'" "../../i/$name_2" | ||
| assert "readlink '$installs/dummy/latest'" "./2.0.0" | ||
| assert_contains "$installs/dummy/latest/bin/dummy" "This is Dummy 2.0.0!" | ||
| assert "test -f '$installs/.mise/names/$name_1'" | ||
| assert "test ! -e '$store/.mise'" | ||
|
|
||
| echo "=== listing and PATH see through the store ===" | ||
| assert_contains "mise ls dummy" "1.1.0" | ||
| assert_contains "mise ls dummy" "2.0.0" | ||
| assert_not_contains "mise ls" "dummy-" | ||
| echo 'tools.dummy = "1"' >mise.toml | ||
| assert "mise which dummy" "$installs/dummy/1/bin/dummy" | ||
| assert_contains "mise x -- dummy" "This is Dummy 1.1.0!" | ||
|
|
||
| echo "=== a lost catalog is rebuilt from the store's receipts ===" | ||
| rm -rf "$installs/.mise" | ||
| assert_contains "mise ls dummy" "1.1.0" | ||
| assert "test -f '$installs/.mise/names/$name_1'" | ||
| assert "mise where dummy@1.1.0" "$dir_1" | ||
|
|
||
| echo "=== uninstall and prune remove the installation and its links ===" | ||
| assert "mise uninstall dummy@2.0.0" | ||
| assert "test ! -e '$dir_2'" | ||
| assert "test ! -L '$installs/dummy/2.0.0'" | ||
| assert "test -d '$dir_1'" | ||
| rm mise.toml | ||
| assert "mise prune --yes dummy" | ||
| assert "test ! -e '$dir_1'" | ||
| assert "test ! -L '$installs/dummy/1.1.0'" | ||
|
|
||
| echo "=== a reinstall lands in the same directory ===" | ||
| assert "mise install dummy@1.1.0" | ||
| assert "mise where dummy@1.1.0" "$dir_1" | ||
|
|
||
| echo "=== a store inside the installs directory is ignored ===" | ||
| assert "MISE_INSTALL_STORE_DIR='$installs/dummy/store' mise install dummy@2.0.0" | ||
| assert_matches "MISE_INSTALL_STORE_DIR='$installs/dummy/store' mise where dummy@2.0.0" "^$installs/dummy-[a-z2-7]{8}\$" | ||
| assert "test ! -e '$installs/dummy/store'" | ||
|
|
||
| echo "=== installs directories sharing a store share its installations ===" | ||
| other="$HOME/other-installs" | ||
| assert "MISE_INSTALLS_DIR='$other' mise install dummy@1.1.0" | ||
| assert "MISE_INSTALLS_DIR='$other' mise where dummy@1.1.0" "$dir_1" | ||
| assert "readlink '$other/dummy/1.1.0'" "$dir_1" | ||
|
|
||
| echo "=== the store written through the installs directory is still the store ===" | ||
| beside="$(MISE_INSTALL_STORE_DIR="$installs/../i" mise where dummy@1.1.0)" | ||
| assert "realpath '$beside'" "$(realpath "$dir_1")" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.