From 6415c9204049b955966b0030dbb2610f6c46c419 Mon Sep 17 00:00:00 2001 From: Lidia Mokevnina Date: Tue, 2 Apr 2024 14:49:50 +0200 Subject: [PATCH] [#412] refactoring --- lib/uffizzi/cli/uninstall.rb | 2 +- lib/uffizzi/services/install_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/uffizzi/cli/uninstall.rb b/lib/uffizzi/cli/uninstall.rb index 7de77ef5..4e10bbb2 100644 --- a/lib/uffizzi/cli/uninstall.rb +++ b/lib/uffizzi/cli/uninstall.rb @@ -86,7 +86,7 @@ def unset_account_installation end def namespace - options[:namespace] || InstallService.current_namespace || InstallService::DEFAULT_NAMESPACE + options[:namespace] || InstallService.current_namespace end def server diff --git a/lib/uffizzi/services/install_service.rb b/lib/uffizzi/services/install_service.rb index c24e8d7e..eddedb42 100644 --- a/lib/uffizzi/services/install_service.rb +++ b/lib/uffizzi/services/install_service.rb @@ -135,7 +135,7 @@ def current_namespace kubeconfig = KubeconfigService.read_kubeconfig(path) return if kubeconfig.nil? - KubeconfigService.get_current_namespace(kubeconfig) + KubeconfigService.get_current_namespace(kubeconfig) || DEFAULT_NAMESPACE end private