Skip to content

Commit c93fc85

Browse files
authored
Merge pull request #24 from flyeralarm/composer_2_compatability
fix for composer 2 compatability
2 parents 27f1c73 + 658b535 commit c93fc85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bin/php-code-validator

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
2-
CALLER_DIR=$(pwd)
3-
cd $(dirname $0)
4-
BIN_DIR=$(pwd)
5-
cd ${CALLER_DIR}
2+
3+
if [[ -z "$COMPOSER_RUNTIME_BIN_DIR" ]]; then
4+
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
else
6+
BIN_DIR="$COMPOSER_RUNTIME_BIN_DIR"
7+
fi
68

79
# used within project
810
if [ -f ${BIN_DIR}/phpcs ]; then

0 commit comments

Comments
 (0)