Honor configured shell for remote exec
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-17 19:26:08 -04:00
parent 7c915a9fd7
commit b8b56c0f32
2 changed files with 42 additions and 3 deletions
+13 -3
View File
@@ -3271,15 +3271,25 @@ async fn run_exec_stream_service(
continue;
}
};
let output = TokioCommand::new("sh")
.arg("-lc")
let shell = {
state
.lock()
.expect("server state poisoned")
.config
.shell
.clone()
};
let output = TokioCommand::new(&shell)
.arg("-c")
.arg(&request.command)
.stdin(Stdio::null())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.output()
.await
.with_context(|| format!("run command {:?}", request.command))?;
.with_context(|| {
format!("run command {:?} with shell {shell}", request.command)
})?;
for chunk in output.stdout.chunks(CHUNK_SIZE) {
send_exec_response_to_client(
&state,