support import paths ending with ".go"
When splitFlagsFromFiles saw "-p foo/bar.go", it thought that was the first Go file, when in fact it's not. We didn't notice because such import paths are pretty rare, but they do exist, like github.com/nats-io/nats.go. Before the fix, the added test case fails as expected: > garble build -tags buildtag [stderr] # test/main/goextension.go open test/main/goextension.go: no such file or directory We could go through the trouble of teaching splitFlagsFromFiles about all of the flags understood by the compiler and linker, but that feels like far more code than the small alternative we went with. And I'm pretty sure the alternative will work pretty reliably for now. Fixes #539.pull/541/head
parent
201d890430
commit
9fc19e8bdf
Loading…
Reference in New Issue