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 6, 2024
1 parent c2b46ea commit 65e3730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/setupmanagers/qemuhck/qemu_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def apply_state(name, state)
when Hash
var_value.merge! value
when Array
var_value << value unless var_value.include? value
var_value |= value

Check warning

Code scanning / Rubocop

Checks for useless assignment to a local variable. Warning

Lint/UselessAssignment: Useless assignment to variable - var\_value.
else
raise(QemuHCKError, "Variable #{var} has unsupported type")
end
Expand Down

0 comments on commit 65e3730

Please sign in to comment.