Open alanraison opened 7 years ago
@handcraftedbits If my issue is a duplicate... any idea what's causing this and plans to fix it?
It's because the current commandline parser just does a simple string split on spaces. Really it needs to know about all the flags that go build/install/test/etc. handle and split appropriately. That's a decent amount of work and I just haven't had the time to dive back into this project lately.
Could you just pass the whole kit and kaboodle to the go command line and call it a day? The command line tool already knows how to parse its own arguments, in theory.
This is still an issue. I need to:
go build --ldflags '-extldflags "-static"'
But it doesn't seem to be possible to pass extldflags. I agree with @yamikuronue , wouldn't it be easier to just pass the whole string?
When using the build task (and possibly others) and supplying
-ldflags
(and presumably also-asmflags
,-gccgoflags
,-gcflags
,-tags
and-toolexec
, all of which accept a quoted list of values), the plugin is unable to parse the command line, presumably because the command is being space-delimited.The command being run is:
but the error indicates that the string inside the quotation marks has been incorrectly split:
Using
"
instead had the same effect, and attempting to escape the spaces with\
also did not work.