diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-15 16:52:55 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-15 16:52:55 -0400 |
| commit | 0e0808bce2160eb1382a2cf9499d943d4e51bdf4 (patch) | |
| tree | cbfe0cf941048121c07396bc5375aa6dc5eb59c8 /lib/commands | |
| parent | d6651e0d8f5bbc7dba12003ccda023c97273ce86 (diff) | |
Add configuration script to choose install paths and default C compiler
and bake those into the compiled Tomo code
Diffstat (limited to 'lib/commands')
| -rw-r--r-- | lib/commands/commands.tm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/commands/commands.tm b/lib/commands/commands.tm index aeadda4f..a5ce607a 100644 --- a/lib/commands/commands.tm +++ b/lib/commands/commands.tm @@ -18,10 +18,10 @@ enum ExitType(Exited(status:Int32), Signaled(signal:Int32), Failed) struct ProgramResult(output:[Byte], errors:[Byte], exit_type:ExitType) func or_fail(r:ProgramResult, message:Text?=none -> ProgramResult) when r.exit_type is Exited(status) - if status == 0 - return r + if status != 0 + fail(message or "Program failed: $r") else fail(message or "Program failed: $r") - fail(message or "Program failed: $r") + return r func output_text(r:ProgramResult, trim_newline=yes -> Text?) when r.exit_type is Exited(status) |
