From 0c573b3dffe806253e1df2447754a5f3939a11f0 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 24 Oct 2016 09:44:56 +0900 Subject: Prepare for termbox/windows build `TAGS=termbox make` (or `go build -tags termbox`) --- src/util/util_windows.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/util/util_windows.go (limited to 'src/util/util_windows.go') 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) +} -- cgit v1.2.3