-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: ${SRCDIR} does not handle paths with % #16959
Comments
I am able to use bind mounts as a workaround. Something like:
|
Have you tried |
Behavior is the same with full argument quoting. |
Note: I tried full argument quoting for |
The list of allowed characters for $SRCDIR is src/go/build/build.go's safeString. % is not one of them. |
CL https://golang.org/cl/31611 mentions this issue. |
What version of Go are you using (
go version
)?go version go1.6.3 linux/amd64
Also tested with go version go1.6.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
Save this Go program as
a%2fb/silly.go
:What did you expect to see?
Expected successful compilation/execution of the program.
What did you see instead?
This happens for
CFLAGS
andLDFLAGS
on multiple architectures.Related to #7906, #16455, #11868, which all discuss spaces in paths; there are issues with other valid path characters as well.
This path was not something I created naturally; it was a side-effect of our CI environment (Jenkins) which occasionally uses paths like
foo%2Fbar
if a Git branch has a name "foo/bar". It also can create paths likefoo%2Fbar@2
when a second scratch directory is needed.The text was updated successfully, but these errors were encountered: