diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-07-27 15:12:00 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-07-30 16:08:33 +0300 |
commit | c6e459d2b50d8a5f940f61cd5c3f61b42094ae52 (patch) | |
tree | 62808cee219f279e26f6a43e7a6799dc31e8468f /lib | |
parent | b169ec7fd3f1b643a1e68d4c9e16247251bf5fe5 (diff) |
Use guard clause in Helm::InstallCommand
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/kubernetes/helm/install_command.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/kubernetes/helm/install_command.rb b/lib/gitlab/kubernetes/helm/install_command.rb index d0d97927508..8e658ff410a 100644 --- a/lib/gitlab/kubernetes/helm/install_command.rb +++ b/lib/gitlab/kubernetes/helm/install_command.rb @@ -43,12 +43,12 @@ module Gitlab end def optional_tls_flags - if files.key?(:'ca.pem') - " --tls" \ - " --tls-ca-cert #{files_dir}/ca.pem" \ - " --tls-cert #{files_dir}/cert.pem" \ - " --tls-key #{files_dir}/key.pem" - end + return unless files.key?(:'ca.pem') + + " --tls" \ + " --tls-ca-cert #{files_dir}/ca.pem" \ + " --tls-cert #{files_dir}/cert.pem" \ + " --tls-key #{files_dir}/key.pem" end end end |