Skip to content

Commit

Permalink
Redirect test run stderr to dev/null
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexB52 committed Feb 15, 2025
1 parent 3668fef commit 10f9257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/retest/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def sync(added:, removed:)

def system_run(command)
log("\n")
@pid = spawn(command)
@pid = spawn(command, err: File::NULL)
Process.wait
@pid = nil
result = $?.exitstatus&.zero? ? :tests_pass : :tests_fail
Expand Down
3 changes: 2 additions & 1 deletion lib/retest/watcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def self.extensions_regex(extensions)
end

def self.watch(dir:, extensions:, polling: false)
command = "./lib/scripts/listen --exts #{extensions.join(',')} -w #{dir} --polling #{polling}"
executable = File.expand_path("../../scripts/listen", __FILE__)
command = "#{executable} --exts #{extensions.join(',')} -w #{dir} --polling #{polling}"

watch_rd, watch_wr = IO.pipe
# Process needs its own process group otherwise the process gets killed on INT signal
Expand Down

0 comments on commit 10f9257

Please sign in to comment.