Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with Open3.popen3 where confirm_documentation task never finishes waiting for child processes #1979

Merged
merged 3 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ end

desc 'Confirm documentation is up to date'
task confirm_documentation: :generate_cops_documentation do
_, _, _, process =
Open3.popen3('git diff --exit-code docs/')

unless process.value.success?
raise 'Please run `rake generate_cops_documentation` ' \
'and add docs/ to the commit.'
stdout, _stderr, status =
Open3.capture3('git diff --exit-code docs/')

unless status.success?
warn 'Documentation is out of sync:'
warn stdout
warn 'Please run `rake generate_cops_documentation` ' \
'and add docs/ to the commit.'
exit 1
end
end

Expand Down
Loading
Loading