Skip to content

Commit

Permalink
workflows: improve replace check in go.mod
Browse files Browse the repository at this point in the history
Since the latest comment introduces a retract statement, with a comment
that contains `replace', the check failed, so we improve it to only
consider `replace' if they're the first thing on a line.
  • Loading branch information
lbajolet-hashicorp committed Aug 1, 2023
1 parent 4c19df0 commit b74d508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Check that go.mod does not contain a replace
run: |
if grep -q "replace" <go.mod; then
if grep -Eq "^\s*replace" <go.mod; then
echo "go.mod contains a replace but should not." >&2
false
fi
Expand Down

0 comments on commit b74d508

Please sign in to comment.