From 78b72bd93a402279617bc80bdf492266780327dd Mon Sep 17 00:00:00 2001 From: timothysmith0609 Date: Fri, 26 Jul 2019 08:37:51 -0400 Subject: [PATCH] avoid nilref error possibility in OptionsHelper#default_template_dir --- lib/kubernetes-deploy/options_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kubernetes-deploy/options_helper.rb b/lib/kubernetes-deploy/options_helper.rb index d0b49b6a0..d4baea3ae 100644 --- a/lib/kubernetes-deploy/options_helper.rb +++ b/lib/kubernetes-deploy/options_helper.rb @@ -35,8 +35,8 @@ def with_validated_template_dirs(template_dirs) private def default_template_dir - if ENV.key?("ENVIRONMENT") - template_dir = File.join("config", "deploy", ENV['ENVIRONMENT']) + template_dir = if ENV.key?("ENVIRONMENT") + File.join("config", "deploy", ENV['ENVIRONMENT']) end if !template_dir || template_dir.empty?