diff --git a/ibazel/command/command.go b/ibazel/command/command.go index bdcb8034..6e56617e 100644 --- a/ibazel/command/command.go +++ b/ibazel/command/command.go @@ -20,6 +20,7 @@ import ( "io/ioutil" "os" "os/exec" + "runtime" "github.com/bazelbuild/bazel-watcher/bazel" "github.com/bazelbuild/bazel-watcher/ibazel/process_group" @@ -40,7 +41,11 @@ type Command interface { // start will be called by most implementations since this logic is extremely // common. func start(b bazel.Bazel, target string, args []string) (*bytes.Buffer, process_group.ProcessGroup) { - tmpfile, err := ioutil.TempFile("", "bazel_script_path") + suffix := "" + if runtime.GOOS == "windows" { + suffix = ".bat" + } + tmpfile, err := ioutil.TempFile("", "bazel_script_path.*" + suffix) if err != nil { fmt.Print(err) } diff --git a/tools/bazel.rc b/tools/bazel.rc index 278fe803..811a8e57 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -1,4 +1,4 @@ -build --workspace_status_command=tools/workplace_status.sh +build --workspace_status_command=tools/workplace_status.bat # Flags used during releases build:release --stamp