From 58554035ea3de924cc0670f811c2664224b22d76 Mon Sep 17 00:00:00 2001
From: Tobias Poganiuch <tobias.poganiuch@seco.com>
Date: Thu, 23 May 2024 14:31:55 +0200
Subject: [PATCH] scripts:release_info: Deep copy dict in merge_variables

Without the deep copy, the merge operation manipulates the dict it is
storing the new values in.
---
 scripts/collect_release_information.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/collect_release_information.py b/scripts/collect_release_information.py
index 52b9acd2..6ba065fd 100755
--- a/scripts/collect_release_information.py
+++ b/scripts/collect_release_information.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python3
 
 import argparse
+import copy
 import sys
 import tempfile
 
@@ -112,7 +113,7 @@ def merge_variables(
     Returns:
         A dictionary containing merged variables
     """
-    merged = first
+    merged = copy.deepcopy(first)
     for key, value in second.items():
         if key not in first:
             merged[key] = value
-- 
GitLab