Skip to content

Commit 43b9ef8

Browse files
committed
Address PR review comments
1 parent 7ebe6b9 commit 43b9ef8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/update-release-version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ update_internal_deps() {
266266
local old_version="$2"
267267
local new_version="$3"
268268

269-
# Escape dots in the old version (e.g., '2.3.0' -> '2\.3\.0') for use in sed regex
269+
# Escape regex metacharacters in the old version (e.g., '.' -> '\.')
270270
local escaped_old_version
271-
escaped_old_version=$(printf '%s' "${old_version}" | sed 's/\./\\./g')
271+
escaped_old_version=$(printf '%s' "${old_version}" | sed 's/[.\*\[\^\$]/\\&/g')
272272

273273
for pack_name in "${INTERNAL_PACKS[@]}"; do
274274
# Update quoted caret-prefixed versions: "^X.Y.Z"

0 commit comments

Comments
 (0)