Skip to content

Commit 3575f49

Browse files
authored
Merge pull request #2 from OrdinoNZ/1-include-checks-in-parent-directory-for-lint-binaries
Implemented parentdir check in locate.sh
2 parents f9f30f8 + 0de438e commit 3575f49

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pre_commit_hooks/helpers/locate.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ prefixed_local_command="php $local_command"
1212

1313
if [ -f "$vendor_command" ]; then
1414
exec_command=$vendor_command
15+
if [ -f "../$vendor_command" ]; then
16+
exec_command="../"+$vendor_command
1517
elif hash $global_command 2>/dev/null; then
1618
exec_command=$global_command
1719
elif [ -f "$local_command" ]; then
1820
exec_command=$prefixed_local_command
21+
elif [ -f "../$local_command" ]; then
22+
exec_command="../"+$prefixed_local_command
1923
else
2024
echo -e "${bldred}No valid ${title} found!${txtrst}"
2125
echo "Please have one available as one of the following:"

0 commit comments

Comments
 (0)