Silence SIGPIPE noise in the launcher no-browser test
grep -q exiting on first match SIGPIPEs the echo feeding it when the haystack is the whole installer, spamming 'write error: Broken pipe' in the CI job log. Feed grep from here-strings instead.
This commit is contained in:
parent
0d0425c8c4
commit
b03142eac8
1 changed files with 4 additions and 2 deletions
|
|
@ -17,9 +17,11 @@ INSTALL_PS1="$SCRIPT_DIR/../../install.ps1"
|
|||
PASS=0
|
||||
FAIL=0
|
||||
|
||||
# Here-strings, not `echo | grep -q`: grep exiting on first match SIGPIPEs
|
||||
# the echo on large haystacks, spamming "write error: Broken pipe" in CI logs.
|
||||
assert_contains() {
|
||||
_label="$1"; _haystack="$2"; _needle="$3"
|
||||
if echo "$_haystack" | grep -qF -- "$_needle"; then
|
||||
if grep -qF -- "$_needle" <<< "$_haystack"; then
|
||||
echo " PASS: $_label"
|
||||
PASS=$((PASS + 1))
|
||||
else
|
||||
|
|
@ -30,7 +32,7 @@ assert_contains() {
|
|||
|
||||
assert_not_contains() {
|
||||
_label="$1"; _haystack="$2"; _needle="$3"
|
||||
if echo "$_haystack" | grep -qF -- "$_needle"; then
|
||||
if grep -qF -- "$_needle" <<< "$_haystack"; then
|
||||
echo " FAIL: $_label (found '$_needle' but should not)"
|
||||
FAIL=$((FAIL + 1))
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue