Skip to content

Commit 496dec1

Browse files
committed
Append .exe to windows builds
1 parent b6c1d0f commit 496dec1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/build.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"os"
77
"path/filepath"
8+
"runtime"
89
"strings"
910

1011
"github.com/Bananenpro/cli"
@@ -47,6 +48,10 @@ func getOutputName(projectRoot, output string) (string, error) {
4748
output = filepath.Base(absRoot)
4849
}
4950

51+
if runtime.GOOS == "windows" {
52+
output += ".exe"
53+
}
54+
5055
if stat, err := os.Stat(output); err == nil && stat.IsDir() {
5156
return "", cli.Error("'%s' already exists and is a directory. Specify another output name with '-o <name>'.", output)
5257
}

0 commit comments

Comments
 (0)