-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi, I found a little bug when using Generate.withFeedback!
If the script returns an Err, the CLI still exits with code 0, but it should return 1.
Minimal code to reproduce:
module Generate exposing (main)
import Gen.CodeGen.Generate as Generate
main : Program () () ()
main =
Generate.withFeedback <| \_ -> Err []Then run elm-codegen run codegen/Generate.elm.
Workaround
A temporary workaround that matches some of the dashes in the error title message.
#!/bin/bash
output=$(elm-codegen run codegen/Generate.elm 2>&1)
echo $output 1>&2
if echo "$output" | grep -q -e "------"; then
exit 1
else
exit 0
fijmpavlick
Metadata
Metadata
Assignees
Labels
No labels