How to run a program in git-bash.exe in a new window
12,113
If git-bash.exe
is compatible with bash
you will need:
git-bash.exe -c /c/Users/PetrKrysl/AppData/Local/Julia-1.0.1/bin/julia.exe
Omitting the -c
causes the file parameter to be interpreted as a text file containing bash
commands, and a binary file is not allowed, as you observed.
The same error is generated if you try to execute a binary program with the source
or .
command from a running bash
.
Related videos on Youtube
Author by
Petr Krysl
Updated on September 18, 2022Comments
-
Petr Krysl over 1 year
When I run the program
/c/Users/PetrKrysl/AppData/Local/Julia-1.0.1/bin/julia.exe
in an opengit-bash.exe
window, it runs fine. However, I'm not able to start a new window withgit-bash.exe /c/Users/PetrKrysl/AppData/Local/Julia-1.0.1/bin/julia.exe
A window opens, but doesn't stay open. There is some sort of error message, but the window vanishes too quickly for me to read what happened.
-
Biswapriyo over 5 yearsUse this option
--hold always
withgit-bash.exe
command. If you find any error add that in your question. -
Petr Krysl over 5 yearsI'm afraid that didn't work. The window still closed immediately. (I used this as git-bash.exe --hold always /c/Users/PetrKrysl/AppData/Local/Julia-1.0.1/bin/julia.exe. I hope that was what you intended?)
-
Biswapriyo over 5 yearsThe capture a video and play it slowly.
-
Petr Krysl over 5 yearsExcellent idea! The error message is bash: /c/Users/PetrKrysl/AppData/Local/Julia-1.0.1/bin/julia.exe: cannot execute binary file
-
AFH over 5 yearsIf
git-bash.exe
is compatible withbash
you will needgit-bash.exe -c /c/Users/PetrKrysl/AppData/Local/Julia-1.0.1/bin/julia.exe
. Omitting the-c
causes the file parameter to be interpreted as a text file containingbash
commands, and a binary file is not allowed, as you observed.. -
Petr Krysl over 5 yearsFantastic, that was it! Thank you very much indeed. Petr
-
AFH over 5 yearsI have submitted an answer, so that others can see that it is solved, provided that you accept it.
-