Skip to content

Commit b2fe5e1

Browse files
author
Greg Bowler
committed
wip: check file exists
1 parent 0e55334 commit b2fe5e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

phpstan-action.bash

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ echo "Docker tag: $docker_tag" >> output.log 2>&1
66

77
if [ "$ACTION_VERSION" = "composer" ]
88
then
9-
ACTION_PHPSTAN_PATH="vendor/bin/phpstan"
9+
VENDOR_BIN="vendor/bin/phpstan"
10+
if test -f "$VENDOR_BIN"
11+
then
12+
ACTION_PHPSTAN_PATH="$VENDOR_BIN"
13+
else
14+
echo "Trying to use version installed by Composer, but there is no file at $ACTION_PHPSTAN_PATH"
15+
exit 1
16+
fi
1017
fi
1118

1219
if [ -z "$ACTION_PHPSTAN_PATH" ]

0 commit comments

Comments
 (0)