Fix path check for linux
This commit is contained in:
@@ -31,15 +31,17 @@ runs:
|
||||
fi
|
||||
|
||||
if [ $hasChanges = false ]; then
|
||||
diff=$(git diff --name-only $baseCommit HEAD)
|
||||
IFS=',' read -r -a paths <<< "${{ inputs.paths }}"
|
||||
diff=$(git diff --name-only $baseCommit HEAD)
|
||||
|
||||
while IFS= read -r line; do
|
||||
for path in "${paths[@]}"; do
|
||||
if [[ $diff == $path* ]]; then
|
||||
if [[ $line == $path* ]]; then
|
||||
hasChanges=true
|
||||
break
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done <<< "$diff"
|
||||
fi
|
||||
|
||||
echo "OUT: has-changes=$hasChanges"
|
||||
|
||||
Reference in New Issue
Block a user