Skip to content

Commit d2dcd52

Browse files
jongioCopilot
andcommitted
fix: skip Windows-only cmd.exe test on Linux CI
TestHandleExecInline_Execution/executes_cmd_inline_on_Windows tries to invoke cmd.exe which doesn't exist on Linux/macOS CI runners. Add runtime.GOOS check to skip on non-Windows platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d13e8ed commit d2dcd52

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cli/src/cmd/exec/commands/mcp_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"errors"
77
"os"
88
"path/filepath"
9+
"runtime"
910
"strings"
1011
"testing"
1112

@@ -481,6 +482,9 @@ func TestHandleExecScript_Validation(t *testing.T) {
481482

482483
func TestHandleExecInline_Execution(t *testing.T) {
483484
t.Run("executes cmd inline on Windows", func(t *testing.T) {
485+
if runtime.GOOS != "windows" {
486+
t.Skip("Windows-only test: cmd.exe is not available on this platform")
487+
}
484488
args := makeToolArgs(map[string]interface{}{"command": "echo hello", "shell": "cmd"})
485489
result, err := handleExecInline(context.Background(), args)
486490
if err != nil {

0 commit comments

Comments
 (0)