Skip to content

Commit

Permalink
QemuHCK: Do not add existing values from states to array
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Mar 7, 2024
1 parent c2b46ea commit 2a1ff1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/setupmanagers/qemuhck/qemu_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a1ff1a

Please sign in to comment.