Skip to content

Commit

Permalink
Merge pull request #25 from hidakatsuya/env-command-returns-sorted-names
Browse files Browse the repository at this point in the history
Now env command returns sorted names
  • Loading branch information
hidakatsuya authored Sep 1, 2024
2 parents 1fc5cc3 + 674014c commit 35d8559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lib/rexer/commands/envs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ def initialize
end

def call
defined_envs.each do
puts _1
end
puts(*defined_envs)
end

private
Expand All @@ -17,7 +15,7 @@ def call

def defined_envs
all_envs = definition.plugins.map(&:env) + definition.themes.map(&:env)
all_envs.uniq
all_envs.uniq.sort
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/integration/integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IntegrationTest < Test::Unit::TestCase

docker_exec("rex envs").then do |result|
assert_true result.success?
assert_equal %w[default env1 env2 env3 env4].sort, result.output.sort
assert_equal %w[default env1 env2 env3 env4], result.output
end

docker_exec("rex install -q").then do |result|
Expand Down

0 comments on commit 35d8559

Please sign in to comment.