mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
1998be3b27
POSIX's `head` specification states: "The application shall ensure that the number option-argument is a positive decimal integer" Negative values are supported on GNU `head`, so this works in the discourse docker image. However, in some environments (e.g. macOS), the system `head` version fails with a negative `n` parameter. This commit does two things: Checks the status at each stage of the pipe, so it cannot fail silently Flip the `ls` command to list in descending time order, and use `tail -n +501` instead of `head -n -500`. The visible result is that macOS users no longer see head: illegal line count -- -500 printed throughout the test suite. |
||
---|---|---|
.. | ||
base_store.rb | ||
local_store.rb | ||
s3_store.rb |