Reputation: 1198
I'm struggling with Git-for-Windows bash: I try to exec into the shell of a kubernetes container, but git bash always prepends a windows path to the shell argument: kubectl run test --image=alpine:latest -it /bin/sh
gets executed as "C:\Program Files\Docker\Docker\resources\bin\kubectl.exe" run test --image=alpine:latest -it "C:/Program Files/Git/usr/bin/sh"
.
How can I prevent the expansion of the /bin/sh
part? Quoting with single quotes ('
) or double quotes ("
) didn't help...
Upvotes: 3
Views: 1503
Reputation: 1198
Answers from David Macek and Johannes Schindelin in the Git-for-Windows Gitter chat:
David Macek @elieux 18:51
Hi. Try kubectl run test --image=alpine:latest -it //bin/sh
.
Otherwise see https://www.msys2.org/wiki/Porting/#filesystem-namespaces for MSYS2_ARG_CONV_EXCL.
Johannes Schindelin @dscho 11:35
In Git for Windows, we have the more convenient MSYS_NO_PATHCONV
variable, too, which is documented in the Known Issues section of the Release Notes.
Upvotes: 6