We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 27f1c73 + 658b535 commit c93fc85Copy full SHA for c93fc85
1 file changed
bin/php-code-validator
@@ -1,8 +1,10 @@
1
#!/bin/bash
2
-CALLER_DIR=$(pwd)
3
-cd $(dirname $0)
4
-BIN_DIR=$(pwd)
5
-cd ${CALLER_DIR}
+
+if [[ -z "$COMPOSER_RUNTIME_BIN_DIR" ]]; then
+ BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+else
6
+ BIN_DIR="$COMPOSER_RUNTIME_BIN_DIR"
7
+fi
8
9
# used within project
10
if [ -f ${BIN_DIR}/phpcs ]; then
0 commit comments