Skip to content

Commit

Permalink
ci: don't try to add files that don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 14, 2022
1 parent 5e39a0a commit 520361c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/commit-if-modified.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ shift
message="$1"
shift
if [ $(git status --porcelain "$@" | egrep '^ M' | wc -l) -gt 0 ]; then
git add "$@"
for f in "$@"; do
if [ -f $f ]; then
git add "$@"
fi
done
git commit -m "$message"
git push || git pull --rebase
git push
Expand Down

0 comments on commit 520361c

Please sign in to comment.