forked from robotex82/markerb
-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stray stderr output on machines with GNU which
On a NixOS machine I was getting a message like the following on every Rails boot: > which: no bun in (... [my path] ...) I chased it down to this library's usage of `which` to find the mjml binary. Using backticks to call it meant stderr was passing through to the terminal. Ubuntu and MacOS use different versions of `which` that do not print to stderr, so it's likely not many people have run into this issue.
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# simulate GNU which's stderr message when it cannot find something | ||
>&2 echo "I should not show up in test output" | ||
|
||
# simulate an empty path by always returning nonzero | ||
exit 1 |
This file contains 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