commit: 296325c3c48f522dcf7eb0ef31a6d0ae0dc586bf
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jun 20 00:02:13 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 20 05:45:36 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=296325c3
emerge-webrsync: ensure opt is initialised as empty
Declare the 'opt' variable as an empty associative array, thereby
ensuring that the environment cannot cause it to be populated with an
unwanted "0" key.
$ opt=foo bash -c 'declare -A opt; declare -p opt'
declare -Ax opt=([0]="foo" )
See-also: 2144492f54f1485bb02193e56f46f87e5e47edf3
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/emerge-webrsync | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 6358ec7f51..4e04f3af12 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -677,5 +677,5 @@ if [[ -n "${PORTAGE_NICENESS}" ]]; then
renice "${PORTAGE_NICENESS}" $$ > /dev/null
fi
-declare -A opt
+declare -A opt=()
main "$@"