Skip to content
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

uv install 0.5.0 sh: line 1027: _force_install_dir: unbound variable #8917

Closed
fraser-langton opened this issue Nov 8, 2024 · 11 comments
Closed

Comments

@fraser-langton
Copy link

fraser-langton commented Nov 8, 2024

Quite bizarre, the same install just started failing, without any changes, and it looks like it's the same version

before (30 mins ago)

downloading uv 0.5.0 x86_64-unknown-linux-musl-static
installing to /root/.local/bin
  uv
  uvx
everything's installed!

To add $HOME/.local/bin to your PATH, either restart your shell or run:

    source $HOME/.local/bin/env (sh, bash, zsh)
    source $HOME/.local/bin/env.fish (fish)
3.8s

now

downloading uv 0.5.0 x86_64-unknown-linux-musl-static

sh: line 1027: _force_install_dir: unbound variable

Edit:
seems to be a widespread issue with a later release of the 0.5.0 install.sh - because the release itself was about 6 hours ago, but only started seeing this an hour ago and I had a working version of 0.5.0 at some point 🤔

@GitHK
Copy link

GitHK commented Nov 8, 2024

I'm also seeing this issue.

@fraser-langton
Copy link
Author

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.4.30/uv-installer.sh | sh works, but downgrading also has breaking changes to PATH 🥺

@zanieb
Copy link
Member

zanieb commented Nov 8, 2024

Thanks for the report! Looks like this broke while patching a uv self update bug. I'll have a fix up quickly.

@ChillarAnand
Copy link

Inside docker file, I have updated the PATH as temporary workaround.

RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.4.30/uv-installer.sh | sh && \
    /root/.cargo/bin/uv python install ${PYTHON_VERSION} && \
    /root/.cargo/bin/uv venv /opt/venv --python ${PYTHON_VERSION}

@zanieb
Copy link
Member

zanieb commented Nov 8, 2024

It should be fixed now. Let me know if not.

@fraser-langton
Copy link
Author

fraser-langton commented Nov 8, 2024

Thank you!

@zanieb I was about to share my hacky fix curl -LsSf https://astral.sh/uv/install.sh | sed 's/^_force_install_dir="$_force_install_dir"/_force_install_dir="${_force_install_dir:-}"/' | sh 😅

@ChillarAnand
Copy link

@zanieb It is working now. Thanks for quick fix.

@zanieb
Copy link
Member

zanieb commented Nov 8, 2024

Thanks for the reports! Sorry about the disruption.

Caused by a previous patch attempting to fix axodotdev/axoupdater#210

@zanieb zanieb closed this as completed Nov 8, 2024
@GitHK
Copy link

GitHK commented Nov 8, 2024

@zanieb something looks wired ~/.cargo/bin/uv is no longer found after the fix, while it used to work in the previous version

@fraser-langton
Copy link
Author

fraser-langton commented Nov 8, 2024

@GitHK

@zanieb something looks wired ~/.cargo/bin/uv is no longer found after the fix, while it used to work in the previous version

I believe that is intentional https://github.com/astral-sh/uv/releases/tag/0.5.0

Previously, uv's installer used $CARGO_HOME or ~/.cargo/bin for its target install directory. It's been a longstanding complaint that uv uses this directory, as there's no relationship to Cargo. Now, uv will be installed into $XDG_BIN_HOME, $XDG_DATA_HOME/../bin, or ~/.local/bin (in that order). Note that $UV_INSTALL_DIR can always be used to override the target directory.

@zanieb
Copy link
Member

zanieb commented Nov 8, 2024

uv self update will preserve a previous install location, but new installs will use the new one 👍

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

No branches or pull requests

4 participants