summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-10-05 09:29:27 -0700
committerelijah <elijah@riseup.net>2015-10-05 09:29:27 -0700
commita094ea23a71ce977e57b30785d70415aa1f4eef9 (patch)
treea5dbd2f441e40e7638e80da63fceb0ab705e4b0a /lib
parent7bdd94cde43d866f5746fccf600fefbca0790af1 (diff)
fixes bug when environment is not listed in tag
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/config/manager.rb4
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
#