From b6663923797b298be691d7c6701af144a4f251fd Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 10 Nov 2025 13:51:54 +0000 Subject: [PATCH] fix: correct execute.Options field names and remove unused import in pkg/moni Fixed compilation errors in pkg/moni/: - Changed 'WorkDir' to 'Dir' in execute.Options (worker.go:500, 516) The execute.Options struct uses 'Dir', not 'WorkDir' - Removed unused 'os/exec' import from ssl.go These fixes resolve the build errors: - pkg/moni/worker.go:500:3: unknown field WorkDir - pkg/moni/worker.go:516:3: unknown field WorkDir - pkg/moni/ssl.go:7:2: "os/exec" imported and not used --- pkg/moni/ssl.go | 1 - pkg/moni/worker.go | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/moni/ssl.go b/pkg/moni/ssl.go index 03be011f..46aa4f59 100644 --- a/pkg/moni/ssl.go +++ b/pkg/moni/ssl.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "os" - "os/exec" "path/filepath" "strconv" "strings" diff --git a/pkg/moni/worker.go b/pkg/moni/worker.go index a4e80ccf..4fe6a56f 100644 --- a/pkg/moni/worker.go +++ b/pkg/moni/worker.go @@ -497,8 +497,8 @@ func restartContainers(rc *eos_io.RuntimeContext, workDir string) error { _, err := execute.Run(ctx, execute.Options{ Command: "docker", Args: []string{"compose", "down"}, - WorkDir: workDir, // P1 FIX: Explicit working directory (thread-safe) - Capture: false, // Show output to user + Dir: workDir, // P1 FIX: Explicit working directory (thread-safe) + Capture: false, // Show output to user }) if err != nil { @@ -513,8 +513,8 @@ func restartContainers(rc *eos_io.RuntimeContext, workDir string) error { _, err = execute.Run(ctx, execute.Options{ Command: "docker", Args: []string{"compose", "up", "-d"}, - WorkDir: workDir, // P1 FIX: Explicit working directory (thread-safe) - Capture: false, // Show output to user + Dir: workDir, // P1 FIX: Explicit working directory (thread-safe) + Capture: false, // Show output to user }) if err != nil {