Skip to content

Commit

Permalink
avoid nilref error possibility in OptionsHelper#default_template_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
timothysmith0609 committed Jul 26, 2019
1 parent 0b23eaf commit 78b72bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/kubernetes-deploy/options_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 78b72bd

Please sign in to comment.