sourcecred/scripts
Dandelion Mané eac0a3ebee
Add helpful message when missing gnu-coreutils (#1034)
As described in #1033: Currently, developers in environments without gnu
coreutils (notably: macOS) get an extremely confusing error message when
they run `yarn test`. This commit ensures that such users instead get a
helpful message with a link to the fix.

Follows @wchargin's proposed approach for fixing #1033, so that Mac
developers get clear guidance on how to get their development
environment working properly.

Expected behavior is that `yarn test` passes when GNU coreutils are
present, and fails with the following message when they are not:

Fixes #1033

```
 FAIL  check-gnu-coreutils
Exit code: 1
Contents of stdout:
    /home/dandelion/git/sc/sourcecred
Contents of stderr:
    Error: Your environment does not provide GNU coreutils
    You're likely developing on macOS.
    Please see the following link for a fix:
    https://github.com/sourcecred/sourcecred/issues/698#issuecomment-417202213
```

Test plan:

Verify that on a machine with gnu coreutils present, the command passes
and does not print irrelevant output.

Verify that on a machine without gnu coreutils available, the command
fails, and prints exactly the error message expected, without any extra
output related to the test's implementation.

Paired-with: @anthrocypher
2019-01-05 12:20:07 -08:00
..
build_static_site.sh Remove cred feedback url configurability (#991) 2018-11-01 17:43:37 -07:00
check-gnu-coreutils.sh Add helpful message when missing gnu-coreutils (#1034) 2019-01-05 12:20:07 -08:00
check-stopships.sh Permit STOPSHIPs in Markdown files (#573) 2018-07-31 10:58:29 -07:00
deploy.sh deploy.sh: depend on build_static_site.sh (#611) 2018-08-06 19:00:35 -07:00
ensure-flow.sh ensure-flow.sh: simplify, removing dep on GNU grep (#602) 2018-08-22 11:44:20 -07:00