12

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?

dimo414
  • 44,897
  • 17
  • 143
  • 228
Phani
  • 341
  • 1
  • 2
  • 9
  • 2
    Phani, any luck? i have the same issue – srini Jun 16 '17 at 17:31
  • No.. may be it is how Git bash behaves in windows. – Phani Jun 27 '17 at 07:41
  • See here for possible solutions: https://stackoverflow.com/questions/7250130/how-to-stop-mingw-and-msys-from-mangling-path-names-given-at-the-command-line#34386471 – John Apr 17 '18 at 15:44
  • Does this answer your question? [How to stop MinGW and MSYS from mangling path names given at the command line](https://stackoverflow.com/questions/7250130/how-to-stop-mingw-and-msys-from-mangling-path-names-given-at-the-command-line) – daveloyall Nov 13 '19 at 22:03
  • The solution John proposes will likely work if you are using a recent version of git-bash, Phani. (I recommend the latest version, 2.24.0 as of 2019-11-13). So, I've flagged this question as a duplicate of that one. – daveloyall Nov 13 '19 at 22:04

0 Answers0