Skip to content

Commit b0ee669

Browse files
authored
Merge pull request #436 from concourse/hide-extra-boolean-output
Hide output from `jq -e` statements
2 parents 284a49a + c1e0e88 commit b0ee669

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

assets/check

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ if [ "$skip_ci_disabled" = "true" ] && \
4646
[ -z "$ignore_paths" ] && \
4747
[ -z "$tag_filter" ] && \
4848
[ -z "$tag_regex" ] && \
49-
jq -e 'length == 0' <<<"$filter_include" && \
50-
jq -e 'length == 0' <<<"$filter_exclude"
49+
jq -e 'length == 0' <<<"$filter_include" &>/dev/null && \
50+
jq -e 'length == 0' <<<"$filter_exclude" &>/dev/null
5151
then
5252
branchflag="HEAD"
5353
if [ -n "$branch" ]; then
@@ -73,7 +73,7 @@ fi
7373

7474
for filter in "$filter_include" "$filter_exclude"
7575
do
76-
if jq -e 'type != "array"' <<<"$filter"
76+
if jq -e 'type != "array"' <<<"$filter" &>/dev/null
7777
then
7878
echo 'invalid commit filter (expected array of strings)'
7979
echo "$filter"
@@ -127,7 +127,7 @@ else
127127
fi
128128

129129
list_command="git rev-list --all --first-parent $log_range $paths_search"
130-
if jq -e 'length > 0' <<<"$filter_include"
130+
if jq -e 'length > 0' <<<"$filter_include" &>/dev/null
131131
then
132132
list_command+=" | git rev-list --stdin --date-order --first-parent --no-walk=unsorted "
133133
include_items=$(echo $filter_include | jq -r -c '.[]')
@@ -140,7 +140,7 @@ then
140140
fi
141141
fi
142142

143-
if jq -e 'length > 0' <<<"$filter_exclude"
143+
if jq -e 'length > 0' <<<"$filter_exclude" &>/dev/null
144144
then
145145
list_command+=" | git rev-list --stdin --date-order --invert-grep --first-parent --no-walk=unsorted "
146146
exclude_items=$(echo $filter_exclude | jq -r -c '.[]')

0 commit comments

Comments
 (0)