Skip to content

Commit

Permalink
Bins: fix path finder for new versions of composer
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Dec 28, 2021
1 parent 4cfe589 commit d955e09
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion bin/codefixer
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SOURCE=${BASH_SOURCE[0]:-$0}

if [[ ${SOURCE} == *contributte/qa/bin/codefixer ]]; then
# vendor/contributte/qa/bin/codefixer
DIR="$(cd "$(dirname $(dirname $(dirname $(dirname "${SOURCE}"))))/bin" && pwd)"
else
# vendor/bin/codefixer
DIR="$(cd "$(dirname "${SOURCE}")" && pwd)"
fi

RULESET=${RULESET:='ruleset.xml'}
EXTENSIONS=${EXTENSIONS:='php,phtml,phpt'}
EXCLUDE_FOLDERS=${EXCLUDE_FOLDERS:='*/temp,*/tmp'}
Expand Down
11 changes: 10 additions & 1 deletion bin/codesniffer
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SOURCE=${BASH_SOURCE[0]:-$0}

if [[ ${SOURCE} == *contributte/qa/bin/codesniffer ]]; then
# vendor/contributte/qa/bin/codesniffer
DIR="$(cd "$(dirname $(dirname $(dirname $(dirname "${SOURCE}"))))/bin" && pwd)"
else
# vendor/bin/codesniffer
DIR="$(cd "$(dirname "${SOURCE}")" && pwd)"
fi

RULESET=${RULESET:='ruleset.xml'}
EXTENSIONS=${EXTENSIONS:='php,phtml,phpt'}
EXCLUDE_FOLDERS=${EXCLUDE_FOLDERS:='*/temp,*/tmp'}
Expand Down

0 comments on commit d955e09

Please sign in to comment.