summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/exec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/exec.rb')
-rw-r--r--lib/bundler/cli/exec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index f0ce450959..b02a610c21 100644
--- a/lib/bundler/cli/exec.rb
+++ b/lib/bundler/cli/exec.rb
@@ -63,6 +63,7 @@ module Bundler
args.pop if args.last.is_a?(Hash)
ARGV.replace(args)
$0 = file
+ Process.setproctitle(process_title(file, *args))
ui = Bundler.ui
Bundler.ui = nil
require "bundler/setup"
@@ -78,6 +79,14 @@ module Bundler
abort "#{e.class}: #{e.message}\n #{backtrace.join("\n ")}"
end
+ def process_title(file, *args)
+ if args.empty?
+ file
+ else
+ "#{file} #{args.join(" ")}".strip
+ end
+ end
+
def ruby_shebang?(file)
possibilities = [
"#!/usr/bin/env ruby\n",