run command and print
This commit is contained in:
parent
0bf48476e1
commit
7b8bca33e6
|
@ -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}");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue