I'm trying to call TFSBuild from the Git Bash shell but I'm not having any luck.
Using
"$TFSBUILD" start //Collection:http://tfsserver
converts the second argument to
//Collection:http://tfsserver
so the argument will not work because it has two slashes at the start.
Using
"$TFSBUILD" start /Collection:http://tfsserver
converts the second argument to
/Collection:http:/tfsserver
so the command will not work because a slash has been removed from the URL.
It looks like for the first option, MSYS Bash thinks the path is a UNC path, so it's not removing the first slash:
An argument starting with 2 or more / is considered an escaped Windows style switch and will be passed with the leading / removed and all \ changed to /. Except that if there is a / following the leading block of /, the argument is considered to be a UNC path and the leading / is not removed.
Is there any workaround or any way to turn off this behavior? I've tried all sorts of combinations of quotes, running on cmd /c instead, using variables, and nothing has worked yet.