From 2a1ff1a67eb539cae6d37fc61b06f41c285958cd Mon Sep 17 00:00:00 2001 From: Kostiantyn Kostiuk Date: Wed, 6 Mar 2024 17:14:11 +0200 Subject: [PATCH] QemuHCK: Do not add existing values from states to array Signed-off-by: Kostiantyn Kostiuk --- lib/setupmanagers/qemuhck/qemu_machine.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/setupmanagers/qemuhck/qemu_machine.rb b/lib/setupmanagers/qemuhck/qemu_machine.rb index 5f92c579..bede929b 100644 --- a/lib/setupmanagers/qemuhck/qemu_machine.rb +++ b/lib/setupmanagers/qemuhck/qemu_machine.rb @@ -300,7 +300,8 @@ def apply_state(name, state) when Hash var_value.merge! value when Array - var_value << value unless var_value.include? value + var_value |= value + instance_variable_set var, var_value else raise(QemuHCKError, "Variable #{var} has unsupported type") end