File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -713,7 +713,12 @@ def print_command
713713 command_name = cmd . name
714714 return if PARSEABLE_COMMANDS . include? ( command_name )
715715 command = [ "bundle" , command_name ] + args
716- command << Thor ::Options . to_switches ( options . sort_by ( &:first ) ) . strip
716+ options_to_print = options . dup
717+ options_to_print . delete_if do |k , v |
718+ next unless o = cmd . options [ k ]
719+ o . default == v
720+ end
721+ command << Thor ::Options . to_switches ( options_to_print . sort_by ( &:first ) ) . strip
717722 command . reject! ( &:empty? )
718723 Bundler . ui . info "Running `#{ command * " " } ` with bundler #{ Bundler . verbose_version } "
719724 end
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33RSpec . describe "bundle list" do
4+ context "in verbose mode" do
5+ it "logs the actual flags passed to the command" do
6+ install_gemfile <<-G
7+ source "https://gem.repo1"
8+ G
9+
10+ bundle "list --verbose"
11+
12+ expect ( out ) . to include ( "Running `bundle list --verbose`" )
13+ end
14+ end
15+
416 context "with name-only and paths option" do
517 it "raises an error" do
618 bundle "list --name-only --paths" , raise_on_error : false
You can’t perform that action at this time.
0 commit comments