Files
OliveTin/service/internal/executor/executor_windows.go
James Read c20eea29cd
Some checks failed
Build Snapshot / build-snapshot (push) Has been cancelled
DevSkim / DevSkim (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
feat: win unicode flag (#590)
2025-05-26 07:33:22 +00:00

25 lines
497 B
Go

//go:build windows
// +build windows
package executor
import (
"context"
"os/exec"
"os"
)
func (e *Executor) Kill(execReq *InternalLogEntry) error {
return execReq.Process.Kill()
}
func wrapCommandInShell(ctx context.Context, finalParsedCommand string) *exec.Cmd {
winCodepage := os.Getenv("OT_WIN_FLAG_U")
if winCodepage == "0" {
return exec.CommandContext(ctx, "cmd", "/C", finalParsedCommand)
} else {
return exec.CommandContext(ctx, "cmd", "/u", "/C", finalParsedCommand)
}
}