Class: Datadog::CI::CLI::Command::Exec
- Defined in:
- lib/datadog/ci/cli/command/exec.rb
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(args) ⇒ Exec
constructor
A new instance of Exec.
Constructor Details
#initialize(args) ⇒ Exec
Returns a new instance of Exec.
9 10 11 12 13 |
# File 'lib/datadog/ci/cli/command/exec.rb', line 9 def initialize(args) super() @args = args end |
Instance Method Details
#exec ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/datadog/ci/cli/command/exec.rb', line 15 def exec rubyopts = [ "-rdatadog/ci/auto_instrument" ] existing_rubyopt = ENV["RUBYOPT"] ENV["RUBYOPT"] = existing_rubyopt ? "#{existing_rubyopt} #{rubyopts.join(" ")}" : rubyopts.join(" ") Kernel.exec(*@args) end |