flow icon indicating copy to clipboard operation
flow copied to clipboard

When errors are found a non-zero status code should be returned

Open joshkalpin opened this issue 12 years ago • 7 comments

I'm trying to integrate flow into travis ci for continuous integration, but flow always returns a 0 status code even when errors are found. To make it more compatible with CI, the tool should return a non-zero status code (or have something to make it more compatible).

joshkalpin avatar Nov 18 '14 20:11 joshkalpin

As a possible workaround at the moment you could parse write your own script that parses flow --json and checks for passed.

tcoopman avatar Nov 18 '14 20:11 tcoopman

This is a bug, flow returns a nonzero code on error if the (flow start; flow) workflow is used but not if 'flow check' is used. flow check is better for CI though. Will fix. tcoopman's workaround should work in the meantime

dsereni avatar Nov 18 '14 20:11 dsereni

@dsereni if this is a simple case of setting the right status code somewhere I could attempt to fix it myself. I just have very little knowledge of OCaml (although, I feel like I could figure it out if it's small) and just am not sure where to even look.

joshkalpin avatar Nov 19 '14 04:11 joshkalpin

@Kapin actually I just fixed it today - it just won't get pushed to GitHub until tomorrow (release day == busy day :-D). If you're interested in fixing a similar problem to learn the codebase let me know; it was reported on the IRC channel that we don't autostart the flow server on 'flow autocomplete' (used by IDEs) and that's definitely on the shortlist of stuff to fix.

In any case the wrong status code issue will be fixed in GitHub by tomorrow. Thanks for reporting!

dsereni avatar Nov 19 '14 04:11 dsereni

If I get some free time I'd be interested. Could you also let me know when the binaries are updated?

joshkalpin avatar Nov 20 '14 02:11 joshkalpin

Actually I'm about to do a deploy later tonight, I'll update this issue when it's pushed. I ended up including the auto start thing too, but I'm sure there'll be loads more like it coming down the pipeline :-)

dsereni avatar Nov 20 '14 03:11 dsereni

0.1.1 is out with the fix, including the new binaries.

dsereni avatar Nov 20 '14 03:11 dsereni