mirror of
https://github.com/tj-actions/changed-files
synced 2025-03-05 21:06:25 +00:00
Fixed bug with all_changed when array is empty (#46)
This commit is contained in:
parent
b25acb4ce7
commit
0e956bb09e
1 changed files with 6 additions and 6 deletions
|
@ -134,14 +134,14 @@ runs:
|
||||||
IFS=" " read -r -a SORTED_INPUT_FILES <<< "$(sort <<<"${ALL_INPUT_FILES[*]}")"
|
IFS=" " read -r -a SORTED_INPUT_FILES <<< "$(sort <<<"${ALL_INPUT_FILES[*]}")"
|
||||||
IFS=" " read -r -a SORTED_OUTPUT_ALL_MODIFIED_FILES <<< "$(sort <<<"${OUTPUT_ALL_MODIFIED_FILES[*]}")"
|
IFS=" " read -r -a SORTED_OUTPUT_ALL_MODIFIED_FILES <<< "$(sort <<<"${OUTPUT_ALL_MODIFIED_FILES[*]}")"
|
||||||
|
|
||||||
|
if [[ ${#SORTED_OUTPUT_ALL_MODIFIED_FILES[@]} -gt 0 ]]; then
|
||||||
|
echo "::set-output name=any_changed::true"
|
||||||
|
|
||||||
if [[ "${SORTED_INPUT_FILES[*]}" == "${SORTED_OUTPUT_ALL_MODIFIED_FILES[*]}" ]]; then
|
if [[ "${SORTED_INPUT_FILES[*]}" == "${SORTED_OUTPUT_ALL_MODIFIED_FILES[*]}" ]]; then
|
||||||
echo "::set-output name=all_changed::true"
|
echo "::set-output name=all_changed::true"
|
||||||
else
|
else
|
||||||
echo "::set-output name=all_changed::false"
|
echo "::set-output name=all_changed::false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${#SORTED_OUTPUT_ALL_MODIFIED_FILES[@]} -gt 0 ]]; then
|
|
||||||
echo "::set-output name=any_changed::true"
|
|
||||||
else
|
else
|
||||||
echo "::set-output name=any_changed::false"
|
echo "::set-output name=any_changed::false"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue