File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -119,15 +119,29 @@ init env =
119119update : Msg -> Model -> { model : Model, command : Cmd Msg }
120120update msg model =
121121 case msg of
122- Exit _ ->
122+ Exit (Err err) ->
123+ { model = model
124+ , command =
125+ Stream.writeLineAsBytes ("Failed Exit with error: " ++ Debug.toString err) model.stdout
126+ |> Task.attempt Exit
127+ }
128+
129+ Exit (Ok _) ->
123130 { model = model
124131 , command =
125132 -- Something special when dealing with CLET, so reading from stdin seems to
126133 -- prevent node from closing. Solving this by closing manually.
127134 Node.exit |> Task.execute
128135 }
129136
130- ExitAfterPipe result ->
137+ ExitAfterPipe (Err err) ->
138+ { model = model
139+ , command =
140+ Stream.writeLineAsBytes ("Failed ExitAfterPipe with error: " ++ Debug.toString err) model.stdout
141+ |> Task.attempt Exit
142+ }
143+
144+ ExitAfterPipe (Ok _) ->
131145 { model = model
132146 , command =
133147 Node.exit |> Task.execute
You can’t perform that action at this time.
0 commit comments