Git Product home page Git Product logo

Comments (8)

lazka avatar lazka commented on June 12, 2024

I'd guess cygwin (and thus the msys Python build) has it's own exe lookup and thus ignores the system directory. Since our bash is always first in our PATH, things shouldn't be a problem independent of pathtype.

Not sure if there is anything we can do here, except to suggest users to delete %SYSTEM32%\\bash.exe if it is a problem.

from setup-msys2.

eine avatar eine commented on June 12, 2024

@lazka, I did not check whether this is a problem with pytest only, or with any Python script which uses check_call or other resources from subprocess.

Not sure if there is anything we can do here, except to suggest users to delete %SYSTEM32%\bash.exe if it is a problem.

Using shutil.which('bash') instead of 'bash' solves the issue. If this is reproducible with any Python script that uses subprocess.* and 'bash', I believe we should add a comment in the README. If this is not specific to the virtual environment, but it can be reproduced on any host with MSYS2 and WSL, it might need to be documented somewhere else.

from setup-msys2.

lazka avatar lazka commented on June 12, 2024

@lazka, I did not check whether this is a problem with pytest only, or with any Python script which uses check_call or other resources from subprocess.

I'd guess any API which calls CreateProcess() internally. But, the question is why would any native Windows app call "bash.exe"? I'd guess that this is a corner case and/or hack in most cases.

from setup-msys2.

eine avatar eine commented on June 12, 2024

@lazka, the use case is using pytest in MINGW32/MINGW64 to handle multiple test scripts. Some are makefiles, other are python scripts, other are shell scripts. See c167722. So, it is not a native Windows app, but a multiplatform testsuite composed mainly of a pytest script and shell/bash scripts.

from setup-msys2.

eine avatar eine commented on June 12, 2024

This is the result if bash is not called:

from setup-msys2.

eine avatar eine commented on June 12, 2024

Ref msys2/msys2-autobuild#1

from setup-msys2.

lazka avatar lazka commented on June 12, 2024

I guess the only thing we can do here is add a section about bash.exe and tar.exe in the README.

from setup-msys2.

Biswa96 avatar Biswa96 commented on June 12, 2024

The WSL's bash.exe is also get confused with a meson build. CI runs System32/bash.exe while calling find_program() with a shell script. Here is the project's meson.build file https://github.com/Genymobile/scrcpy/blob/master/server/meson.build

from setup-msys2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.