From c2b52e368251ddef888f4949349d6ed84d0770c7 Mon Sep 17 00:00:00 2001 From: Viggo Gao Date: Wed, 23 Apr 2025 01:40:13 +0800 Subject: [PATCH] Update shell_windows.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复在Windows平台上编译报错 undefined Shell --- internal/actuator/shell_windows.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/actuator/shell_windows.go b/internal/actuator/shell_windows.go index 29be403..17f5d5e 100644 --- a/internal/actuator/shell_windows.go +++ b/internal/actuator/shell_windows.go @@ -11,6 +11,15 @@ import ( "syscall" ) +type ( + Shell struct { + User string + Env []string + Dir string + Command string + } +) + // Exec Execute shell tasks func (actuator *Shell) Exec(ctx context.Context) *models.TaskRecords { cmd := exec.CommandContext(ctx, "cmd", "/C", actuator.Command)