This commit is contained in:
Viktor Liu
2025-07-02 21:04:58 +02:00
parent 96084e3a02
commit 0d5408baec
8 changed files with 234 additions and 67 deletions

View File

@@ -401,3 +401,11 @@ func (s *Server) killProcessGroup(cmd *exec.Cmd) {
logger.Debugf("kill process failed: %v", err)
}
}
// buildShellArgs builds shell arguments for executing commands
func buildShellArgs(shell, command string) []string {
if command != "" {
return []string{shell, "-Command", command}
}
return []string{shell}
}