Run "bash myscript.sh". This will work if bash is on PATH, which it
probably is, since developers have to use git.
Details
- Reviewers
scott.linder mehdi_amini - Commits
- rGefd1f17cd923: Fix .arclint on Windows
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
'bash' in my cmd.exe command prompt will run WSL's bash.exe (which is in Window's system directory)
'bash' in my mingw terminal will run mingw's bash.
Is this intended? 'git' in cmd.exe will run mingw's git. It may not even matter since invoking 'utils/arcanist/clang-format.sh' from cmd.exe didn't even work in any case before.
I don't have a way to test this, but it seems like an OK change to me, modulo the fact that I don't know the effect of the weirdness @Meinersbur brings up.
Does git really depend on bash, or just "POSIX sh"? We could instead change the script to invoke /bin/sh and audit it to be POSIX.
I think we should really just rewrite it in Python, which I intended to do but haven't had a chance to yet.
It's true, I'm just hoping that the right bash is on PATH. I feel bad leaving this here as a stumbling block for someone who uses cmd.exe with arcanist to trip over, but I need to do something for myself in the meantime.
Yes, if you install git for Windows, it contains bash. There's no package manager, so it's not exactly a dependency.
I think we should really just rewrite it in Python, which I intended to do but haven't had a chance to yet.
I agree, a Python port would work best in the long run, and would address the cmd.exe issues @Meinsersbur raised.
Thanks for looking at this, I'll land it soon.