mirror of
https://github.com/MedzikUser/go-github-selfupdate.git
synced 2024-08-15 03:25:29 +00:00
consider .exe is added to executable on Windows
This commit is contained in:
parent
75e095f048
commit
cf74f35eed
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
@ -16,7 +17,11 @@ func setupTestBinary() {
|
|||
}
|
||||
|
||||
func teardownTestBinary() {
|
||||
if err := os.Remove("github-release-test"); err != nil {
|
||||
bin := "github-release-test"
|
||||
if runtime.GOOS == "windows" {
|
||||
bin = "github-release-test.exe"
|
||||
}
|
||||
if err := os.Remove(bin); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue