From 517dc1ecd009421d7f1d4959d7dff596c0414cf6 Mon Sep 17 00:00:00 2001 From: Peter Buchmann Date: Tue, 15 Jul 2014 12:27:25 +0200 Subject: [PATCH] suggested fix f windows and multidir import path --- rerun.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rerun.go b/rerun.go index a82ecb3..86ab512 100644 --- a/rerun.go +++ b/rerun.go @@ -16,6 +16,7 @@ import ( "os/exec" "path" "path/filepath" + "runtime" ) var ( @@ -182,6 +183,15 @@ func rerun(buildpath string, args []string) (err error) { } else { binPath = filepath.Join(pkg.BinDir, binName) } + if runtime.GOOS == "windows" { + // under my windows go 1.3, the executables + // end up directly under $GOPATH/bin + // not $GOPATH/bin/ + binBase := filepath.Base(binName) + binPath = filepath.Join(pkg.BinDir, binBase) + } + + var runch chan bool if !(*never_run) {