Skip to content

Commit

Permalink
check the if the data is not empty then reset the timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 committed Dec 18, 2024
1 parent 2c4dc10 commit d5083a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/lib/dependabot/command_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ def self.capture3_with_timeout(
data = data.encode("UTF-8", invalid: :replace, undef: :replace, replace: "?")

# Reset the timeout if data is received
last_output_time = Time.now if data
last_output_time = Time.now unless data.empty?

# 4. Append data to the appropriate stream
if io == stdout_io
stdout += data
else
Expand Down

0 comments on commit d5083a9

Please sign in to comment.