Skip to content

Commit 45014aa

Browse files
committed
cleanup exit code handling
1 parent c03e83a commit 45014aa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

platform/main.roc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ mainForHost! = \_ ->
3434
if Str.isEmpty msg then
3535
code
3636
else
37-
when Stderr.line! msg is
38-
Ok {} -> code
39-
Err (StderrErr _) -> code
37+
_= Stderr.line! msg
38+
code
4039

4140
Err msg ->
4241

@@ -48,6 +47,5 @@ mainForHost! = \_ ->
4847
Tip: If you do not want to exit on this error, use `Result.mapErr` to handle the error. Docs for `Result.mapErr`: <https://www.roc-lang.org/builtins/Result#mapErr>
4948
"""
5049

51-
when Stderr.line! helpMsg is
52-
Ok {} -> 1
53-
Err (StderrErr _) -> 1
50+
_= Stderr.line! helpMsg
51+
1

0 commit comments

Comments
 (0)