Skip to content

Commit

Permalink
Optimize php bin check
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuench committed Sep 25, 2023
1 parent 7383bba commit 039dbb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions tests/bats/functional_core_commands.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ setup() {
load 'test_helper/bats-assert/load'

declare PHP_BIN
PHP_BIN=$(which php)
if [ $? -ne 0 ]; then
if ! PHP_BIN=$(which php); then
echo "Error: PHP binary not found"
exit 1
fi


if [ -z "$N98_MAGERUN2_BIN" ]; then
echo "ENV variable N98_MAGERUN2_BIN is missing"
exit 1
Expand Down
3 changes: 1 addition & 2 deletions tests/bats/functional_magerun_commands.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ setup() {
load 'test_helper/bats-assert/load'

declare PHP_BIN
PHP_BIN=$(which php)
if [ $? -ne 0 ]; then
if ! PHP_BIN=$(which php); then
echo "Error: PHP binary not found"
exit 1
fi
Expand Down

0 comments on commit 039dbb3

Please sign in to comment.