diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-07-01 10:49:14 -0300 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-07-19 17:19:28 -0500 |
commit | 88f712cf7cf41b715c3a88fd737cf53f3d807d2a (patch) | |
tree | 8c15817b61f9bdb4185f0d835b86f0766e0fca67 /lib/bundler/cli.rb | |
parent | 5515464bfc38dda105496c4db3dc21cd223cc33e (diff) | |
download | bundler-88f712cf7cf41b715c3a88fd737cf53f3d807d2a.tar.gz |
[CLI] Print running command
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r-- | lib/bundler/cli.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index ed81ffbf..821a9e2a 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -16,6 +16,10 @@ module Bundler Bundler::SharedHelpers.print_major_deprecations! end + def self.dispatch(*) + super {|i| i.send(:print_command) } + end + def initialize(*args) super Bundler.reset! @@ -517,5 +521,15 @@ module Bundler Bundler.reset! end end + + def print_command + _, _, config = @_initializer + current_command = config[:current_command].name + return if current_command == "exec" + command = ["bundle", current_command] + args + command << Thor::Options.to_switches(options) + command.reject!(&:empty?) + Bundler.ui.info "Running `#{command * " "}` with bundler #{Bundler::VERSION}" + end end end |