Skip to content

Commit

Permalink
Fixes #34812 - add logging of script runner shell cmd at debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Apr 25, 2022
1 parent 6b348d6 commit 9eaf69d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ def run_async(command)
raise 'Async command already in progress' if @process_manager&.started?

@user_method.reset
initialize_command(*get_args(command, true))
full_cmd = get_args(command, true)
@logger.debug("running command: #{full_cmd.join('')}")
initialize_command(*full_cmd)

true
end
Expand All @@ -310,7 +312,9 @@ def run_started?
end

def run_sync(command, stdin: nil, publish: false, close_stdin: true, tty: false)
pm = Proxy::Dynflow::ProcessManager.new(get_args(command, tty))
full_cmd = get_args(command, tty)
@logger.debug("running command: #{full_cmd.join('')}")
pm = Proxy::Dynflow::ProcessManager.new(full_cmd)
if publish
pm.on_stdout { |data| publish_data(data, 'stdout', pm); '' }
pm.on_stderr { |data| publish_data(data, 'stderr', pm); '' }
Expand Down

0 comments on commit 9eaf69d

Please sign in to comment.