From d3161ea60ecb3d674e5b4a818385b85d314a2e6b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 21 Sep 2023 22:12:04 +0200 Subject: [PATCH] test/system: Limit the scope of the return value to the function This should prevent this function from overwriting variables of the same name beyond the function and causing hard-to-debug problems. https://github.com/containers/toolbox/pull/1372 --- test/system/libs/helpers.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash index 79dd1f2..deb0707 100644 --- a/test/system/libs/helpers.bash +++ b/test/system/libs/helpers.bash @@ -439,7 +439,7 @@ function container_started() { start_container "$container_name" # Used as a return value - container_initialized=1 + local -i container_initialized=1 local -i j local num_of_retries=5