Skip to content

Commit

Permalink
Attempt to fix build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
magni- committed Jul 20, 2021
1 parent 009e7c1 commit 5649db5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion selfupdate/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ import (

func setupTestBinary(name ...string) {
var options []string
var output string
if len(name) == 0 {
options = []string{"build", "./testdata/github-release-test/"}
} else {
options = []string{"build", "-o", name[0], "./testdata/github-release-test/"}
output = name[0]
if runtime.GOOS == "windows" {
output += ".exe"
}
options = []string{"build", "-o", output, "./testdata/github-release-test/"}
}

if err := exec.Command("go", options...).Run(); err != nil {
Expand Down

0 comments on commit 5649db5

Please sign in to comment.