diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-06-20 09:43:41 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-20 09:43:41 -0500 |
commit | 531d52f8ef61177d62191586b5fda9f35b29e5ef (patch) | |
tree | 193a7cb90110f099bb9b6fd6fd9175534f3784f7 | |
parent | 4614ed4274bae9207927436d810c0062a9000ce5 (diff) | |
download | bundler-seg-verbose-cli-print-no-defaults.tar.gz |
[CLI] Sort options for stability on ruby < 2seg-verbose-cli-print-no-defaults
-rw-r--r-- | lib/bundler/cli.rb | 2 | ||||
-rw-r--r-- | spec/bundler/cli_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 99eaa00cf9..58a7ce491a 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -630,7 +630,7 @@ module Bundler next unless o = current_command.options[k] o.default == v end - command << Thor::Options.to_switches(options_to_print).strip + command << Thor::Options.to_switches(options_to_print.sort_by(&:first)).strip command.reject!(&:empty?) Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler::VERSION}" end diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb index beec88b8a6..36fd5a6e46 100644 --- a/spec/bundler/cli_spec.rb +++ b/spec/bundler/cli_spec.rb @@ -62,7 +62,7 @@ RSpec.describe "bundle executable" do it "doesn't print defaults" do install_gemfile! "", :verbose => true - expect(out).to start_with("Running `bundle install --verbose --retry 0 --no-color` with bundler #{Bundler::VERSION}") + expect(out).to start_with("Running `bundle install --no-color --retry 0 --verbose` with bundler #{Bundler::VERSION}") end end |