Skip to content

Commit

Permalink
fix: handle file not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jul 8, 2023
1 parent dd9ae66 commit cb5d14a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ runs:
shell: bash

- run: |
version_present=$(sed -n '/^plugins:/,/^[^ ]/{/version:/p}' "ape-config.yaml" | grep -c version)
if [ -f "ape-config.yaml" ]; then
version_present=$(sed -n '/^plugins:/,/^[^ ]/{/version:/p}' "ape-config.yaml" | grep -c version)
else
version_present = 0
fi
if [[ "$version_present" == "1" ]] && [[ ${{ inputs.ape-plugins-list }} == "" ]]; then
plugins_value="."
elif [[ ${{ inputs.ape-plugins-list }} == "" ]]; then
Expand Down

0 comments on commit cb5d14a

Please sign in to comment.