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

Commit

Permalink
Don't append PackagePath if it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Aug 14, 2019
1 parent d8caaff commit 4feb530
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions go.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ func GoCrossCompile(opts *CompileOpts) error {
"-ldflags", opts.Ldflags,
"-asmflags", opts.Asmflags,
"-tags", opts.Tags,
"-o", outputPathReal,
opts.PackagePath)
"-o", outputPathReal)

if opts.PackagePath != "" {
args = append(args, opts.PackagePath)
}

_, err = execGo(opts.GoCmd, env, chdir, args...)
return err
Expand Down

0 comments on commit 4feb530

Please sign in to comment.