Skip to content

Commit b939392

Browse files
authored
Fix Homebrew checksum matcher in publish workflow (#297)
1 parent 75e2be3 commit b939392

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
end
116116
117117
checksums.each do |artifact, checksum|
118-
pattern = /(\Q#{artifact}\E"\n\s+sha256 ")([0-9a-f]{64})(")/
118+
pattern = /(#{Regexp.escape(artifact)}"\n\s+sha256 ")([0-9a-f]{64})(")/
119119
unless text.sub!(pattern) { "#{$1}#{checksum}#{$3}" }
120120
abort("Failed to update checksum for #{artifact}")
121121
end

0 commit comments

Comments
 (0)