Skip to content

Commit

Permalink
fix: do not run sed with no input files
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh authored Oct 13, 2023
1 parent 1f7c691 commit 2232b24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ jobs:
run: |
git clean -fd # make sure there aren't untracked files / directories
if [[ -n "$IGNORE_PROTOC_VERSION_COMMENTS" ]]; then
find . -name '*.pb.go' -print0 | xargs -0 sed -i '/^\/\/.*protoc.*v/d'
find . -name '*.pb.go' -print0 | xargs -0 -r sed -i '/^\/\/.*protoc.*v/d'
git add .
git commit -m "chore: remove protoc version comments"
fi
go generate -x ./...
if [[ -n "$IGNORE_PROTOC_VERSION_COMMENTS" ]]; then
find . -name '*.pb.go' -print0 | xargs -0 sed -i '/^\/\/.*protoc.*v/d'
find . -name '*.pb.go' -print0 | xargs -0 -r sed -i '/^\/\/.*protoc.*v/d'
fi
git add .
# check if go generate modified or added any files
Expand Down

0 comments on commit 2232b24

Please sign in to comment.