Created
December 22, 2017 18:44
-
-
Save davidmfoley/49bd76788124b866cbe8d850ed36d85c to your computer and use it in GitHub Desktop.
Run flow (flowtype) check, errors sent to stderr, exit non-zero on failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# flow check prints all of its output to stdout. | |
# In CI, we want to print only failures to stderr to make them easier to find in the build log. | |
# ignore flow diag messages, get rid of 'success' message', then redirect to stderr | |
# grep -v exits non-zero on match match, so we flip the exit code | |
! flow check 2>/dev/null | grep -v 'Found 0 errors' 1>&2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment