collaborative posix test (#672)

* collaborative posix test

* fix after review
This commit is contained in:
Viktor Scharf
2025-05-05 10:21:11 +02:00
committed by GitHub
parent 7c8174bb80
commit 308f801f03
11 changed files with 142 additions and 23 deletions

View File

@@ -198,7 +198,19 @@ func CommandHandler(res http.ResponseWriter, req *http.Request) {
}
}
}
raw := false
if r, ok := body["raw"].(bool); ok {
raw = r
}
exitCode, output := opencloud.RunCommand(command, stdIn)
var exitCode int
var output string
if raw {
exitCode, output = opencloud.RunRawCommand(command, stdIn)
} else {
exitCode, output = opencloud.RunCommand(command, stdIn)
}
sendCmdResponse(res, exitCode, output)
}