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 Jul 3, 2018
1 parent e05df8d commit 8189155
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 @@ -112,8 +112,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 8189155

Please sign in to comment.