Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"os/exec"
"path"
"path/filepath"
"runtime"
)

var (
Expand Down Expand Up @@ -182,6 +183,15 @@ func rerun(buildpath string, args []string) (err error) {
} else {
binPath = filepath.Join(pkg.BinDir, binName)
}
if runtime.GOOS == "windows" {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if runtime.GOOS == "windows" {
    binPath = strings.Replace(binPath, "\\bin\\", "\\src\\", -1)
    binBase := filepath.Base(binName)
    binPath = filepath.Join(binPath, binBase)
    log.Printf("windows binPath = %s", binPath)
}

// under my windows go 1.3, the executables
// end up directly under $GOPATH/bin
// not $GOPATH/bin/<import path>
binBase := filepath.Base(binName)
binPath = filepath.Join(pkg.BinDir, binBase)
}



var runch chan bool
if !(*never_run) {
Expand Down