Skip to content

Commit 61a22ec

Browse files
authored
fix(nextjs): Use indexing to iterate in for-loops in vercel script (#3818)
This isn't necessary in zsh, but it turns out it is in bash.
1 parent f8a4d60 commit 61a22ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nextjs/vercel/install-sentry-from-branch.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ PACKAGE_NAMES=$(ls PACKAGES_DIR)
4848
# Modify each package's package.json file by searching in it for sentry dependencies from the monorepo and, for each
4949
# sibling dependency found, replacing the version number with a file dependency pointing to the sibling itself (so
5050
# `"@sentry/utils": "6.9.0"` becomes `"@sentry/utils": "file:/abs/path/to/sentry-javascript/packages/utils"`)
51-
for package in $PACKAGE_NAMES; do
51+
for package in ${PACKAGE_NAMES[@]}; do
5252
# Within a given package.json file, search for each of the other packages in turn, and if found, make the replacement
53-
for package_dep in $PACKAGE_NAMES; do
53+
for package_dep in ${PACKAGE_NAMES[@]}; do
5454
sed -Ei /"@sentry\/${package_dep}"/s/"[0-9]+\.[0-9]+\.[0-9]+"/"file:${ESCAPED_PACKAGES_DIR}\/${package_dep}"/ ${PACKAGES_DIR}/${package}/package.json
5555
done
5656
done

0 commit comments

Comments
 (0)