I am using Git bash in windows to run a .sh shell script. This script takes some arguments. One of those arguments is a path as shown below:
Test test --path /ROOT/phani123 --comment testing
When I debug the path argument through my Javacode it actually looks like C:/Program Files/Git/ROOT/phani123. Git bash is prepending its location to the path I've passed.
How to stop Git bash doing this?
You need to set the following environment variable to disable this:
export MSYS_NO_PATHCONV=1
See https://stackoverflow.com/a/34386471/8261
Shamelessly copied from the other thread with an MSYS focus, for clarity here: (Go and give the answer a +1)
In summary, to disable this Posix path convesion:
MSYS2_ARG_CONV_EXCL="*"MSYS_NO_PATHCONV=1MSYS_NO_PATHCONV=1.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With