Skip to content

Commit 867ae84

Browse files
committed
remove the whichs
1 parent 78a207c commit 867ae84

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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-
$(/usr/bin/which echo) "{ \"status\": \"error\", \"message\": \"$1\", \"stderr\": \"$(tr '\n' ' ' <$_tmp)\" }"
10+
echo "{ \"status\": \"error\", \"message\": \"$1\", \"stderr\": \"$(tr '\n' ' ' <$_tmp)\" }"
1111
else
12-
$(/usr/bin/which echo) "{ \"status\": \"error\", \"message\": \"$1\" }"
12+
echo "{ \"status\": \"error\", \"message\": \"$1\" }"
1313
fi
1414

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

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

tasks/reset_pgrepack_schema.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ declare PT__installdir
66
source "$PT__installdir/pe_databases/files/common.sh"
77

88
#Determine if PE Postgres is available
9-
if puppet resource service pe-postgresql | $(/usr/bin/which grep) -q running; then
9+
if puppet resource service pe-postgresql | grep -q running; then
1010
#Remove the pg_repack extension
1111
su - pe-postgres -s '/bin/bash' -c '/opt/puppetlabs/server/bin/psql -d pe-puppetdb -c "DROP EXTENSION pg_repack CASCADE"' || fail "unable to drop pg_repack extension"
1212

0 commit comments

Comments
 (0)