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

Fix cygpath missing error in virtualenv activate script #10492

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jan 11, 2025

Closes #10487

&> is not supported by all shells... but I'm confused how that would cause that behavior still.

Adding the following to the Dockerfile fixes the error

RUN sed -i 's/command -v cygpath \&> \/dev\/null/command -v cygpath > \/dev\/null 2>\&1/' $VENV_DIR/bin/activate

Interestingly

❯ docker run --platform linux/amd64 -it public.ecr.aws/p3v4g4o2/reflex-cloud-base:v0.0.7-py3.12 \
    /bin/sh -c 'command -v cygpath &> /dev/null; echo $?'
0

❯ docker run --platform linux/amd64 -it public.ecr.aws/p3v4g4o2/reflex-cloud-base:v0.0.7-py3.12 \
    /bin/sh -c 'command -v cygpath > /dev/null 2>&1; echo $?'
127

❯ docker run --platform linux/amd64 -it public.ecr.aws/p3v4g4o2/reflex-cloud-base:v0.0.7-py3.12 \
    /bin/sh -c 'command -v cygpath; echo $?'
127

❯ docker run --platform linux/amd64 -it public.ecr.aws/p3v4g4o2/reflex-cloud-base:v0.0.7-py3.12 \
    /bin/sh -c '{ [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; }; echo $?'
1

❯ docker run --platform linux/amd64 -it public.ecr.aws/p3v4g4o2/reflex-cloud-base:v0.0.7-py3.12 \
    /bin/sh -c '{ [ "x$OSTYPE" = "cygwin" ] || [ "x$OSTYPE" = "msys" ]; } && command -v foobar &> /dev/null && echo "hi"; echo $?'
hi
0

@zanieb zanieb changed the title Fix cygpath missing error message in virtualenv activate script Fix cygpath missing error in virtualenv activate script Jan 11, 2025
@zanieb
Copy link
Member Author

zanieb commented Jan 11, 2025

There are other problems though, e.g., #10498

@Gankra Gankra self-requested a review January 11, 2025 15:42
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.

cygpath: not found in linux
1 participant