Skip to content

Commit

Permalink
Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy committed Oct 25, 2018
1 parent 97aee99 commit ea225fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ibazel/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion tools/bazel.rc
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ea225fe

Please sign in to comment.