Skip to content

Commit bea87ea

Browse files
None of the global options have default so this seems unnecessary
1 parent 66aabcc commit bea87ea

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

bundler/lib/bundler/cli.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,7 @@ def print_command
714714
command_name = cmd.name
715715
return if PARSEABLE_COMMANDS.include?(command_name)
716716
command = ["bundle", command_name] + args
717-
options_to_print = options.dup
718-
options_to_print.delete_if do |k, v|
719-
next unless o = cmd.options[k]
720-
o.default == v
721-
end
722-
command << Thor::Options.to_switches(options_to_print.sort_by(&:first)).strip
717+
command << Thor::Options.to_switches(options.sort_by(&:first)).strip
723718
command.reject!(&:empty?)
724719
Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler::VERSION}"
725720
end

bundler/spec/bundler/cli_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,8 @@ def out_with_macos_man_workaround
116116
gemfile "source 'https://gem.repo1'"
117117
bundle "info bundler", verbose: true
118118
expect(out).to start_with("Running `bundle info bundler --verbose` with bundler #{Bundler::VERSION}")
119-
end
120119

121-
it "doesn't print defaults" do
122-
install_gemfile "source 'https://gem.repo1'", verbose: true
120+
bundle "install", verbose: true
123121
expect(out).to start_with("Running `bundle install --verbose` with bundler #{Bundler::VERSION}")
124122
end
125123
end

0 commit comments

Comments
 (0)