Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-07-27 15:12:00 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-07-30 16:08:33 +0300
commitc6e459d2b50d8a5f940f61cd5c3f61b42094ae52 (patch)
tree62808cee219f279e26f6a43e7a6799dc31e8468f /lib
parentb169ec7fd3f1b643a1e68d4c9e16247251bf5fe5 (diff)
Use guard clause in Helm::InstallCommand
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/kubernetes/helm/install_command.rb12
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