list of shells to try in windows.
This commit is contained in:
parent
50d410f090
commit
b016917bdc
@ -17,6 +17,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -155,6 +156,10 @@ func main() {
|
|||||||
// Need to create listener implementation that aactually listens for websocket connections.
|
// Need to create listener implementation that aactually listens for websocket connections.
|
||||||
var service AgentService
|
var service AgentService
|
||||||
shells := []string{"bash", "sh", "ash", "ksh", "zsh", "fish", "tcsh", "csh"}
|
shells := []string{"bash", "sh", "ash", "ksh", "zsh", "fish", "tcsh", "csh"}
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
shells = []string{"cmd", "powershell", "bash"}
|
||||||
|
}
|
||||||
|
|
||||||
shell := ""
|
shell := ""
|
||||||
for _, candidate := range shells {
|
for _, candidate := range shells {
|
||||||
shell, err = exec.LookPath(candidate)
|
shell, err = exec.LookPath(candidate)
|
||||||
|
Loading…
Reference in New Issue
Block a user