Skip to content

Commit

Permalink
[CMSP-678]: Shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Wagner committed Oct 11, 2023
1 parent d3705dd commit f9942d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/behat-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Delete the Pantheon site environment after the Behat test suite has run.
###

if [ "$(terminus whoami)" -ne 0 ]; then
if ! "$(terminus whoami)"; then
echo "Terminus unauthenticated; assuming unauthenticated build"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/behat-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# such that it can be run a second time if a step fails.
###

if [ "$(terminus whoami)" -ne 0 ]; then
if ! "$(terminus whoami)"; then
echo "Terminus unauthenticated; assuming unauthenticated build"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/behat-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Execute the Behat test suite against a prepared Pantheon site environment.
###

if [ "$(terminus whoami)" -ne 0 ]; then
if ! "$(terminus whoami)"; then
echo "Terminus unauthenticated; assuming unauthenticated build"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/full-teardown-wp-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ drop_db() {
local EXTRA=""

if [ -n "$DB_HOSTNAME" ] ; then
if [ $(echo "$DB_SOCK_OR_PORT" | grep -e '^[0-9]\{1,\}$') ]; then
if echo "$DB_SOCK_OR_PORT" | grep -q -e '^[0-9]\{1,\}$'; then
EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
elif [ -n "$DB_SOCK_OR_PORT" ] ; then
EXTRA=" --socket=$DB_SOCK_OR_PORT"
Expand Down

0 comments on commit f9942d5

Please sign in to comment.