summaryrefslogtreecommitdiffstats
path: root/src/util/util_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/util_windows.go')
-rw-r--r--src/util/util_windows.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/util_windows.go b/src/util/util_windows.go
new file mode 100644
index 00000000..a660f39e
--- /dev/null
+++ b/src/util/util_windows.go
@@ -0,0 +1,17 @@
+// +build windows
+
+package util
+
+import (
+ "os"
+ "os/exec"
+)
+
+// ExecCommand executes the given command with $SHELL
+func ExecCommand(command string) *exec.Cmd {
+ shell := os.Getenv("SHELL")
+ if len(shell) == 0 {
+ shell = "cmd"
+ }
+ return exec.Command(shell, "/c", command)
+}