summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r--lib/leap_cli/commands/inspect.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/leap_cli/commands/inspect.rb b/lib/leap_cli/commands/inspect.rb
index 23c75bb..746a80c 100644
--- a/lib/leap_cli/commands/inspect.rb
+++ b/lib/leap_cli/commands/inspect.rb
@@ -39,7 +39,7 @@ module LeapCli; module Commands
:inspect_service
elsif path_match?(:tag_config, full_path)
:inspect_tag
- elsif path_match?(:provider_config, full_path)
+ elsif path_match?(:provider_config, full_path) || path_match?(:provider_env_config, full_path)
:inspect_provider
elsif path_match?(:common_config, full_path)
:inspect_common
@@ -108,6 +108,8 @@ module LeapCli; module Commands
def inspect_provider(arg, options)
if options[:base]
inspect_json manager.base_provider
+ elsif arg =~ /provider\.(.*)\.json/
+ inspect_json manager.providers[$1]
else
inspect_json manager.provider
end
@@ -130,7 +132,9 @@ module LeapCli; module Commands
end
def inspect_json(config)
- puts JSON.sorted_generate(config)
+ if config
+ puts JSON.sorted_generate(config)
+ end
end
def path_match?(path_symbol, path)