From 3761e121031e6ca48df6f98a329fc118031f1b34 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 3 Apr 2024 15:04:29 -0500 Subject: [PATCH] Fail loud if something is nil --- lib/admin_command.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/admin_command.rb b/lib/admin_command.rb index edd8cff86a6b75678abec3b054684bbba7cd5ed7..7ca159502e8d6ad9c2ebde6001a26988e5eaea2b 100644 --- a/lib/admin_command.rb +++ b/lib/admin_command.rb @@ -59,9 +59,9 @@ class AdminCommand snikket_repo=Snikket::Repo.new ) @target_customer = target_customer - @customer_repo = customer_repo - @admin_action_repo = admin_action_repo - @snikket_repo = snikket_repo + @customer_repo = customer_repo || (raise "No cutomer repo") + @admin_action_repo = admin_action_repo || (raise "No admin action repo") + @snikket_repo = snikket_repo || (raise "No snikket repo") end def start(command_action=:execute)