File 0249-otp-fix-incorrect-use-of-variables-in-sub-shells.patch of Package erlang

From a92de880a75cf5a6b8bf92e5196028db0aa06046 Mon Sep 17 00:00:00 2001
From: Kiko Fernandez-Reyes <kiko@erlang.org>
Date: Wed, 4 Feb 2026 14:41:12 +0100
Subject: [PATCH 1/2] otp: fix incorrect use of variables in sub-shells

---
 .github/scripts/renovate-vendored-deps.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/scripts/renovate-vendored-deps.sh b/.github/scripts/renovate-vendored-deps.sh
index 34df8ed95f..fb9fc423ea 100755
--- a/.github/scripts/renovate-vendored-deps.sh
+++ b/.github/scripts/renovate-vendored-deps.sh
@@ -52,7 +52,6 @@ for VENDOR_INFO in $MODIFIED_FILES; do
     VENDOR_DIR=$(dirname "$VENDOR_INFO")
 
     # Parse the vendor.info file
-    sed 's@^/.*@@' "$VENDOR_INFO" | jq -c '.[]' |
     while read -r ENTRY; do
         ID=$(echo $ENTRY | jq -r '.ID')
         UPDATE_SCRIPT=$(echo $ENTRY | jq -r '.update')
@@ -76,7 +75,8 @@ for VENDOR_INFO in $MODIFIED_FILES; do
             SUCCESS=false
             FAILED_UPDATES="$FAILED_UPDATES\n- $ID ($VERSION): Update script not found: $UPDATE_SCRIPT"
         fi
-    done
+    done  < <(sed 's@^/.*@@' "$VENDOR_INFO" | jq -c '.[]')
+    # uses process substitution, so that variables do not end up in sub-shells and lost.
 done
 
 if $SUCCESS && ! git diff --quiet "${HEAD}"; then
@@ -93,4 +93,4 @@ fi
 
 if ! $SUCCESS; then
     exit 1
-fi
\ No newline at end of file
+fi
-- 
2.51.0

openSUSE Build Service is sponsored by