Skip to content

Commit 8549cfc

Browse files
author
Greg Bowler
authored
Merge pull request #14 from php-actions/7-multiple-paths
Fix multiple paths
2 parents b26bd28 + bf9abe2 commit 8549cfc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following configuration options are available:
4949
+ `php_version` The version of PHP to use e.g. `7.4` (default: latest)
5050
+ `php_extensions` Space-separated list of extensions using [php-build][php-build] e.g. `xdebug mbstring` (default: N/A)
5151
+ `command` The command to run e.g. `list` or `worker` (default: analyse)
52-
+ `path` Path(s) with source code to run analysis on (required)
52+
+ `path` Path(s) with source code to run analysis on, space-separated (required)
5353
+ `configuration` Configuration file location
5454
+ `level` Level of rule options - the higher, the stricter
5555
+ `paths_file` Path to a file with a list of paths to run analysis on

phpstan-action.bash

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ fi
1717

1818
if [ -n "$ACTION_PATH" ]
1919
then
20-
command_string+=("$ACTION_PATH")
20+
IFS=" "
21+
read -r -a splitIFS <<< "$ACTION_PATH"
22+
for path in "${splitIFS[@]}"
23+
do
24+
command_string+=("$path")
25+
done
2126
fi
2227

2328
if [ -n "$ACTION_CONFIGURATION" ]

0 commit comments

Comments
 (0)