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

Commit

Permalink
Fixes the build output path issues on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterclaerhout committed Dec 12, 2019
1 parent 635404c commit a9465b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ func (builder Builder) outputPath(cfg config.Config) (string, error) {
if builder.FileExists(cfg.Build.OutputPath) {
return "", errors.New("Config setting build.output_path should point to a directory, not a file")
}
outputPath = filepath.Join(cfg.Build.OutputPath, cfg.Project.Name)
outputPath = cfg.Build.OutputPath
}

if outputPath != "" && builder.GOOS == "windows" && filepath.Ext(outputPath) != ".exe" {
outputPath = filepath.Join(outputPath, cfg.Project.Name)

if builder.GOOS == "windows" && filepath.Ext(outputPath) != ".exe" {
outputPath = outputPath + ".exe"
}

Expand Down

0 comments on commit a9465b5

Please sign in to comment.