aboutsummaryrefslogtreecommitdiff
path: root/examples/commands/commands.tm
diff options
context:
space:
mode:
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