aboutsummaryrefslogtreecommitdiff
path: root/examples/commands/commands.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-04 18:29:09 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-04 18:29:09 -0400
commit7b735ab6fc3e0bb368f1ca484168eaefbbe3ce9c (patch)
tree4a7c78bb0967b8fbc1042d901cf0346705d9d0d8 /examples/commands/commands.tm
parent0b8074154e2671691050bdb3bcb33245625a056c (diff)
Misc fixes
Diffstat (limited to 'examples/commands/commands.tm')
-rw-r--r--examples/commands/commands.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/commands/commands.tm b/examples/commands/commands.tm
index ddd04d7b..170e45bc 100644
--- a/examples/commands/commands.tm
+++ b/examples/commands/commands.tm
@@ -11,12 +11,12 @@ enum ExitType(Exited(status:Int32), Signaled(signal:Int32), Failed):
when e is Exited(status): return (status == 0)
else: return no
- func or_fail(e:ExitType, message=none:Text):
+ func or_fail(e:ExitType, message:Text?=none):
if not e:succeeded():
fail(message or "Program failed: $e")
struct ProgramResult(stdout:[Byte], stderr:[Byte], exit_type:ExitType):
- func or_fail(r:ProgramResult, message=none:Text -> ProgramResult):
+ func or_fail(r:ProgramResult, message:Text?=none -> ProgramResult):
when r.exit_type is Exited(status):
if status == 0:
return r