Skip to content

Commit a51d1ce

Browse files
committed
fix echo pathing for ubuntu
1 parent 05f0530 commit a51d1ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

files/common.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ fail() {
77
# Print a stderr: entry if there were anything printed to stderr
88
if [[ -s $_tmp ]]; then
99
# Hack to try and output valid json by replacing newlines with spaces.
10-
echo "{ \"status\": \"error\", \"message\": \"$1\", \"stderr\": \"$(tr '\n' ' ' <$_tmp)\" }"
10+
$(/usr/bin/which echo) "{ \"status\": \"error\", \"message\": \"$1\", \"stderr\": \"$(tr '\n' ' ' <$_tmp)\" }"
1111
else
12-
echo "{ \"status\": \"error\", \"message\": \"$1\" }"
12+
$(/usr/bin/which echo) "{ \"status\": \"error\", \"message\": \"$1\" }"
1313
fi
1414

1515
exit ${2:-1}
1616
}
1717

1818
success() {
19-
echo "$1"
19+
$(/usr/bin/which echo) "$1"
2020
exit 0
2121
}
2222

0 commit comments

Comments
 (0)