Method: Makit::Commands::Request#run

Defined in:
lib/makit/commands/request.rb

#runResult

Execute the command.

Returns:

  • (Result)

    execution result

Raises:

  • (ArgumentError)

    if runner is not set



217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/makit/commands/request.rb', line 217

def run
  # self.exit_on_failure = exit_on_failure
  # self.show_stderr = true
  result = Makit::Commands::Runner.default.execute(show_stderr(true))

  # Display stderr if the command failed and show_stderr is enabled
  puts result.stderr if result.failure? && show_stderr? && !result.stderr.empty?

  # Exit with the command's exit code if it failed and exit_on_failure is enabled
  exit result.exit_code if result.failure? && exit_on_failure?

  result
end