(path: &Path, settings: &CompilationSettings)
| 929 | } |
| 930 | |
| 931 | fn execute_binary(path: &Path, settings: &CompilationSettings) -> Result<()> { |
| 932 | if settings.debug { |
| 933 | println!("Running program: {}", path.display()); |
| 934 | } |
| 935 | |
| 936 | let mut command = ProcessCommand::new(path); |
| 937 | settings.apply_runtime_env(&mut command); |
| 938 | |
| 939 | let status = command |
| 940 | .status() |
| 941 | .with_context(|| format!("failed to execute {}", path.display()))?; |
| 942 | |
| 943 | if !status.success() { |
| 944 | if settings.debug { |
| 945 | eprintln!("\nStack trace:"); |
| 946 | eprintln!(" Exit status: {}", status); |
| 947 | } |
| 948 | bail!("program exited with status {status}"); |
| 949 | } |
| 950 | |
| 951 | Ok(()) |
| 952 | } |
| 953 | |
| 954 | fn run_program_with_jit( |
| 955 | program: &otterc_ast::nodes::Program, |
no test coverage detected