-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Revised activate
script fails on alpine:edge
#10498
Labels
bug
Something isn't working
Comments
charliermarsh
changed the title
This change caused our CI to fail using
Revised Jan 11, 2025
alpine:edge
imageactivate
script fails on alpine:edge
I can't reproduce this FROM alpine:edge
RUN apk add --update --no-cache python3
COPY --from=ghcr.io/astral-sh/uv:0.5.17 /uv /uvx /bin/
RUN uv venv /venv
RUN . /venv/bin/activate |
@andypost am I using a different image or shell than you? |
@zanieb the way to reproduce is FROM alpine:edge
RUN apk add --update --no-cache python3
COPY --from=ghcr.io/astral-sh/uv:0.5.17 /uv /uvx /bin/
RUN uv venv /venv
RUN set -eux && . /venv/bin/activate the log
|
Thanks! Looks like this can be resolved with
or ❯ gd
diff --git a/crates/uv-virtualenv/src/activator/activate b/crates/uv-virtualenv/src/activator/activate
index 3678ee23b..f87ca81dd 100644
--- a/crates/uv-virtualenv/src/activator/activate
+++ b/crates/uv-virtualenv/src/activator/activate
@@ -78,7 +78,7 @@ deactivate () {
deactivate nondestructive
VIRTUAL_ENV='{{ VIRTUAL_ENV_DIR }}'
-if { [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; } && command -v cygpath > /dev/null 2>&1 ; then
+if { [ "${OSTYPE-}" = "cygwin" ] || [ "${OSTYPE-}" = "msys" ]; } && command -v cygpath > /dev/null 2>&1; then
VIRTUAL_ENV=$(cygpath -u "$VIRTUAL_ENV")
fi
export VIRTUAL_ENV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This change caused our CI to fail using
alpine:edge
imageOriginally posted by @andypost in #10397 (comment)
The text was updated successfully, but these errors were encountered: