File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,11 @@ if [[ "${CODER_LIBSH_NO_CHECK_DEPENDENCIES:-}" != *t* ]]; then
152
152
# old version of Make installed out of the box that doesn't support new
153
153
# features like ONESHELL.
154
154
#
155
- # Piping commands directly into `head -n1` may result in ERRPIPE errors, so
156
- # we capture the version output first before
157
- make_version_raw=" $( make --version 2> /dev/null) "
158
- make_version=" $( echo " $make_version_raw " | head -n1 | grep -oE ' ([[:digit:]]+\.){1,2}[[:digit:]]+' ) "
155
+ # We have to disable pipefail temporarily to avoid ERRPIPE errors when
156
+ # piping into `head -n1`.
157
+ set +o pipefail
158
+ make_version=" $( make --version 2> /dev/null | head -n1 | grep -oE ' ([[:digit:]]+\.){1,2}[[:digit:]]+' ) "
159
+ set -o pipefail
159
160
if [[ ${make_version// .*/ } -lt 4 ]]; then
160
161
libsh_bad_dependencies=1
161
162
log " ERROR: You need at least make 4.0 to run the scripts in the Coder repo."
You can’t perform that action at this time.
0 commit comments