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
I installed uv using the standalone installation script.
This is Windows 10, MSYS2. uv 0.6.12 (e4e03833f 2025-04-02)
When running uv self update, I get: warning: Self-update is only available for uv binaries installed via the standalone installation scripts.
% command -v uv
/c/Users/Wilson/.local/bin/uv
This is maybe a bug related to my strange platform? The standalone installer script has direct MSYS2 support, and that code looked correct to me, so I'm not sure where the exact root is.
Platform
Windows 10: MINGW64_NT-10.0-19045 3.6.0-529a0f09.x86_64 x86_64 Msys
The current executable is at C:\Users\xxx\.local\bin\uv.exe but the standalone installer was used to install uv to /c/Users/xxx/.local/bin. Are multiple copies of uv installed?
Very interestingly, the receipts are equivalent except for the install_prefix value:
Enabling supporting POSIX-compliant environments is not a well-defined task. After all, should MSYS2 be considered POSIX just because it has some of the utilities?
I generally agree with uv's opinion about configuration files - Windows is Windows, regardless of any software-defined compatibility layer on top of it, and any user/system level configuration should be read from %APPDATA% and %SYSTEMDRIVE% respectively.
W.r.t to the installation itself, a straightforward way to support MSYS2/Git bash for uv self update would be to adjust the bash installer script to check the presence of MSYS and, if true:
Move the receipt to %LOCALAPPDATA%,
Perform path conversion for install_prefix
This shouldn't break any existing settings and does not require adjusting the receipt lookup at all.
Very cool that there's progress on this, I look forward to re-testing it soon. Sorry for the silence after reporting it, life has been action-packed! MINGW is deprecated/gone in MSYS2 now, so that aspect will be different, but from the above, that doesn't sound like it is related to the root cause.
Activity
eegli commentedon May 29, 2025
As mentioned in the linked issue above, axoupdater always tries to load the receipt from
%LOCALAPPDATA%/uv/uv-receipt.jsonon Windows:uv/crates/uv/src/commands/self_update.rs
Line 47 in 72e2821
The installation script https://astral.sh/uv/install.sh works for POSIX-compliant environments, including MSIS2 and even Git bash as a minimal subset of MSYS2. However, when running the installer scripts on Windows:
~/.config/uv/%LOCALAPPDATA%/uv/uv-receipt.jsonHence, installing via Powershell works as expected, via bash the receipt is in the "wrong" place.
So can we simply move the receipt after installing via bash to where axoupdater expects it?
Running
uv self updatenow complains with:Very interestingly, the receipts are equivalent except for the
install_prefixvalue:"install_prefix": "C:\\Users\\xxx\\.local\\bin","install_prefix": "/c/Users/xxx/.local/bin",Which happens due to to path conversion. Setting the path in the receipt to a valid Windows path eventually works.
[-]`uv self update` prints warning in MSYS2 environment[/-][+]`uv self update` fails in MSYS2 environment[/+]zanieb commentedon May 29, 2025
Thanks for the details!
cc @Gankra
eegli commentedon May 29, 2025
Enabling supporting POSIX-compliant environments is not a well-defined task. After all, should MSYS2 be considered POSIX just because it has some of the utilities?
I generally agree with uv's opinion about configuration files - Windows is Windows, regardless of any software-defined compatibility layer on top of it, and any user/system level configuration should be read from
%APPDATA%and%SYSTEMDRIVE%respectively.W.r.t to the installation itself, a straightforward way to support MSYS2/Git bash for
uv self updatewould be to adjust the bash installer script to check the presence of MSYS and, if true:%LOCALAPPDATA%,install_prefixThis shouldn't break any existing settings and does not require adjusting the receipt lookup at all.
Gankra commentedon May 29, 2025
Wow incredible writeup!
Gankra commentedon May 29, 2025
I believe this change could be made to the installer script yes:
https://github.com/axodotdev/cargo-dist/blob/c8ba950c63f9c38c77782912ec6cdb6807bd0fbd/cargo-dist/templates/installer/installer.sh.j2#L53
eegli commentedon May 29, 2025
Just realized that the installer script is autogenerated from
cargo-dist. Should I raise it in the upstream repo?Yes,
RECEIPT_HOMEneeds to be adjusted. Furthermore,AXO_INSTALL_PREFIXinhttps://github.com/axodotdev/cargo-dist/blob/c8ba950c63f9c38c77782912ec6cdb6807bd0fbd/cargo-dist/templates/installer/installer.sh.j2#L577
needs to evaluate to a Windows path with escaped backslashes.
zanieb commentedon May 29, 2025
We're working off a fork of cargo-dist for now (the upstream is no longer maintained): https://github.com/astral-sh/cargo-dist
axel-kah commentedon Oct 2, 2025
I always wondered why the update failed in my GitBash. I followed @eegli 's instructions and now I can update again 👍
Would be great if this makes it into your cargo-dist fork.
eegli commentedon Nov 1, 2025
@zanieb @Gankra since this has been open for a while, would you mind if I claim this issue and open a PR in the cargo-dist fork?
eegli commentedon Jun 10, 2026
The issue is fixed in cargo-dist, all that's left to do is using v0.32+ for publishing uv: https://github.com/axodotdev/cargo-dist/releases/tag/v0.32.0
wilson commentedon Aug 24, 2026
Very cool that there's progress on this, I look forward to re-testing it soon. Sorry for the silence after reporting it, life has been action-packed! MINGW is deprecated/gone in MSYS2 now, so that aspect will be different, but from the above, that doesn't sound like it is related to the root cause.