Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 8189155

Browse files
committed
Don't append PackagePath if it's empty
1 parent e05df8d commit 8189155

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

go.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ func GoCrossCompile(opts *CompileOpts) error {
112112
"-ldflags", opts.Ldflags,
113113
"-asmflags", opts.Asmflags,
114114
"-tags", opts.Tags,
115-
"-o", outputPathReal,
116-
opts.PackagePath)
115+
"-o", outputPathReal)
116+
117+
if opts.PackagePath != "" {
118+
args = append(args, opts.PackagePath)
119+
}
117120

118121
_, err = execGo(opts.GoCmd, env, chdir, args...)
119122
return err

0 commit comments

Comments
 (0)