summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/makepkg.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 22e02535..da68dc74 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2466,6 +2466,9 @@ array_build() {
# Build an array of the indicies of the source array.
eval "keys=(\"\${!$2[@]}\")"
+ # Clear the destination array
+ eval "$dest=()"
+
# Read values indirectly via their index. This approach gives us support
# for associative arrays, sparse arrays, and empty strings as elements.
for i in "${keys[@]}"; do