Skip to content
Snippets Groups Projects
util_windows.go 276 B
Newer Older
// +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)
}