aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-02-13 10:16:21 -0800
committerelijah <elijah@riseup.net>2014-02-13 10:16:21 -0800
commit1e3ac556ea8d12dc73640a2eb354a6425391f513 (patch)
treef3857ed737ff92fd59ebfa193acd7bb0e2735baa /lib
parentfb2a2b84566030dfa6953e2bb63322d6b2ff4cae (diff)
downloadleap_cli-1e3ac556ea8d12dc73640a2eb354a6425391f513.tar.gz
leap_cli-1e3ac556ea8d12dc73640a2eb354a6425391f513.tar.bz2
fix bug with compiling secrets.json
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/config/secrets.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/leap_cli/config/secrets.rb b/lib/leap_cli/config/secrets.rb
index 45a57e1..08e980b 100644
--- a/lib/leap_cli/config/secrets.rb
+++ b/lib/leap_cli/config/secrets.rb
@@ -32,10 +32,13 @@ module LeapCli; module Config
if only_discovered_keys
self.each_key do |environment|
self[environment].each_key do |key|
- unless @discovered_keys[environment][key]
+ unless @discovered_keys[environment] && @discovered_keys[environment][key]
self[environment].delete(key)
end
end
+ if self[environment].empty?
+ self.delete(environment)
+ end
end
end
super()