From f7258c19d1decd80ae01b16a52777c576e4f7999 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Thu, 18 Aug 2022 21:47:42 +0200 Subject: [PATCH] fix: Make sure volume selection return nil instead of an exception --- src/lib/actions/apply.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/actions/apply.cr b/src/lib/actions/apply.cr index be319b9..b8eb506 100644 --- a/src/lib/actions/apply.cr +++ b/src/lib/actions/apply.cr @@ -23,7 +23,7 @@ module Arkisto @config.targets.each do |config_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? puts " ERROR: no volume found with this id".colorize(:red)