From 5c36843166b3924461e0c7d39dc1b2076ffec1cc Mon Sep 17 00:00:00 2001
From: Erik Brakkee <erik@brakkee.org>
Date: Mon, 22 Jul 2024 23:57:36 +0200
Subject: [PATCH] list of shells to try in windows.

---
 cmd/agent/agent.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmd/agent/agent.go b/cmd/agent/agent.go
index c9b6c7a..14378d7 100755
--- a/cmd/agent/agent.go
+++ b/cmd/agent/agent.go
@@ -17,6 +17,7 @@ import (
 	"net/url"
 	"os"
 	"os/exec"
+	"runtime"
 	"strings"
 	"time"
 
@@ -155,6 +156,10 @@ func main() {
 	// Need to create listener implementation that aactually listens for websocket connections.
 	var service AgentService
 	shells := []string{"bash", "sh", "ash", "ksh", "zsh", "fish", "tcsh", "csh"}
+	if runtime.GOOS == "windows" {
+		shells = []string{"cmd", "powershell", "bash"}
+	}
+
 	shell := ""
 	for _, candidate := range shells {
 		shell, err = exec.LookPath(candidate)