diff options
author | elijah <elijah@riseup.net> | 2015-10-05 09:29:27 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-10-05 09:29:27 -0700 |
commit | a094ea23a71ce977e57b30785d70415aa1f4eef9 (patch) | |
tree | a5dbd2f441e40e7638e80da63fceb0ab705e4b0a /lib | |
parent | 7bdd94cde43d866f5746fccf600fefbca0790af1 (diff) |
fixes bug when environment is not listed in tag
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/config/manager.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index 9b452f3..2013217 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -50,7 +50,9 @@ module LeapCli # the returned array includes nil (for the default environment) # def environment_names - @environment_names ||= [nil] + env.tags.collect {|name, tag| tag['environment']}.compact + @environment_names ||= begin + [nil] + (env.tags.field('environment') + nodes.field('environment')).compact.uniq + end end # |