Class: Bundler::CLI::Exec
- Inherits:
-
Object
- Object
- Bundler::CLI::Exec
- Defined in:
- lib/bundler/cli/exec.rb
Constant Summary collapse
- TRAPPED_SIGNALS =
%w[INT].freeze
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options, args) ⇒ Exec
constructor
A new instance of Exec.
- #run ⇒ Object
Constructor Details
#initialize(options, args) ⇒ Exec
Returns a new instance of Exec.
11 12 13 14 15 16 |
# File 'lib/bundler/cli/exec.rb', line 11 def initialize(, args) = @cmd = args.shift @args = args @args << { :close_others => !.keep_file_descriptors? } unless Bundler.current_ruby.jruby? end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
7 8 9 |
# File 'lib/bundler/cli/exec.rb', line 7 def args @args end |
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
7 8 9 |
# File 'lib/bundler/cli/exec.rb', line 7 def cmd @cmd end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/bundler/cli/exec.rb', line 7 def end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bundler/cli/exec.rb', line 18 def run validate_cmd! SharedHelpers.set_bundle_environment if bin_path = Bundler.which(cmd) if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path) return kernel_load(bin_path, *args) end kernel_exec(bin_path, *args) else # exec using the given command kernel_exec(cmd, *args) end end |