SKAFFOLD_GO_GCFLAGS should not be quoted #4863
Labels
area/build
area/debug
kind/bug
Something isn't working
priority/p0
Highest priority. We are actively looking at delivering it.
Milestone
Expected behavior
skaffold debug
providesSKAFFOLD_GO_GCFLAGS
to be used in Dockerfiles to build and link Go apps in a form suitable for debugging (as per diff below). But the resulting binaries are still optimized.Actual behavior
Note the crazy quoting going on with
SKAFFOLD_GO_GCFLAGS
, and-N -l
is not applied to the actual compile command.Skaffold is single-quoting the environment value set:
https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/docker/build_args.go#L34-L35
The use of the build argument requires being quoted:
We just need to remove the single-quoting of the build definition.area
Workaround
To make this work, use
eval go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" ...
Information
The text was updated successfully, but these errors were encountered: