Skip to content

Commit 292fc8b

Browse files
owen-mcCopilot
andauthored
Fix detection of failed text replacement
I checked and the comment seems to be correct. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent a1759d9 commit 292fc8b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/go-version-update.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ jobs:
9696
CURRENT_MAJOR_MINOR_ESCAPED=$(echo "$CURRENT_MAJOR_MINOR" | sed 's/\./\\./g')
9797
9898
# Update MODULE.bazel
99-
if ! sed -i "s/go_sdk\.download(version = \"$CURRENT_VERSION_ESCAPED\")/go_sdk.download(version = \"$LATEST_VERSION_NUM\")/" MODULE.bazel; then
100-
echo "Warning: Failed to update MODULE.bazel"
99+
sed -i "s/go_sdk\.download(version = \"$CURRENT_VERSION_ESCAPED\")/go_sdk.download(version = \"$LATEST_VERSION_NUM\")/" MODULE.bazel
100+
if ! grep -q "go_sdk.download(version = \"$LATEST_VERSION_NUM\")" MODULE.bazel; then
101+
echo "Error: Failed to update MODULE.bazel"
102+
exit 1
101103
fi
102104
103105
# Update go/extractor/go.mod

0 commit comments

Comments
 (0)