1
Fork 0

run command and print

This commit is contained in:
Jan-Erik Rediger 2024-05-24 22:00:27 +02:00
parent 0bf48476e1
commit 7b8bca33e6

View file

@ -128,4 +128,11 @@ pub fn run_code(code: &str) {
let cmd_args = command("/app/main.ha"); let cmd_args = command("/app/main.ha");
bwrap_cmd.args(cmd_args); bwrap_cmd.args(cmd_args);
let output = bwrap_cmd.output().expect("running bwrap failed");
let stdout = String::from_utf8_lossy(&output.stdout);
let stderr = String::from_utf8_lossy(&output.stderr);
println!("stdout:\n{stdout}");
println!("stderr:\n{stderr}");
} }