Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion crates/cheatcodes/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,17 @@ impl Cheatcode for ffiCall {
let Self { commandInput: input } = self;

let output = ffi(state, input)?;
// TODO: check exit code?

if output.exitCode != 0 {
let stderr = String::from_utf8_lossy(&output.stderr);
return Err(fmt_err!(
"FFI command {:?} failed with exit code {}: {}",
input,
output.exitCode,
stderr
));
}

if !output.stderr.is_empty() {
let stderr = String::from_utf8_lossy(&output.stderr);
error!(target: "cheatcodes", ?input, ?stderr, "non-empty stderr");
Expand Down