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

Commit 4feb530

Browse files
committed
Don't append PackagePath if it's empty
1 parent d8caaff commit 4feb530

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

go.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@ func GoCrossCompile(opts *CompileOpts) error {
116116
"-ldflags", opts.Ldflags,
117117
"-asmflags", opts.Asmflags,
118118
"-tags", opts.Tags,
119-
"-o", outputPathReal,
120-
opts.PackagePath)
119+
"-o", outputPathReal)
120+
121+
if opts.PackagePath != "" {
122+
args = append(args, opts.PackagePath)
123+
}
121124

122125
_, err = execGo(opts.GoCmd, env, chdir, args...)
123126
return err

0 commit comments

Comments
 (0)