fix: Make sure volume selection return nil instead of an exception
Some checks failed
continuous-integration/drone Build is failing
Some checks failed
continuous-integration/drone Build is failing
This commit is contained in:
parent
17f2e8b3eb
commit
f7258c19d1
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ module Arkisto
|
||||||
|
|
||||||
@config.targets.each do |config_volume_item|
|
@config.targets.each do |config_volume_item|
|
||||||
os_volume_item =
|
os_volume_item =
|
||||||
os_volumes.select {|vol| vol.id == config_volume_item.volume_id }.first
|
os_volumes.select {|vol| vol.id == config_volume_item.volume_id }.first?
|
||||||
|
|
||||||
if os_volume_item.nil?
|
if os_volume_item.nil?
|
||||||
puts " ERROR: no volume found with this id".colorize(:red)
|
puts " ERROR: no volume found with this id".colorize(:red)
|
||||||
|
|
Loading…
Reference in a new issue