diff --git a/tool/goinstall/installer.go b/tool/goinstall/installer.go index 7863323..5f9daf2 100644 --- a/tool/goinstall/installer.go +++ b/tool/goinstall/installer.go @@ -6,6 +6,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "strings" "text/template" @@ -43,6 +44,10 @@ func (i Installer) InstallTo(version, destDir string) (string, error) { fields := strings.Split(path, "/") binName := fields[len(fields)-1] binPath := filepath.Join(destDir, binName) + // TODO: probably refactor this somewhere + if runtime.GOOS == "windows" { + binPath = binPath + ".exe" + } spec := fmt.Sprintf("%s@%s", path, version) if strings.HasPrefix(i.config.Module, ".") || strings.HasPrefix(i.config.Module, "/") {