We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d589a9 commit 9bb0ba7Copy full SHA for 9bb0ba7
internal/mcp/server/builtin/tools/command/command_test.go
@@ -33,6 +33,13 @@ func TestTool_Command_Exec_Echo(t *testing.T) {
33
func TestTool_Command_Exec_Sudo(t *testing.T) {
34
c := getTestClient(t)
35
36
+ // check if sudo is available
37
+ _, err := os.Stat("/usr/bin/sudo")
38
+ if os.IsNotExist(err) {
39
+ t.Skip("Skipping test, 'sudo' command not available on this system")
40
+ return
41
+ }
42
+
43
apScript, err := os.Create(path.Join(t.TempDir(), "ask_pass.sh"))
44
require.NoError(t, err)
45
require.NoError(t, os.Chmod(apScript.Name(), 0700)) // Make it executable
0 commit comments