Skip to content

Commit c155235

Browse files
authored
Merge pull request #1979 from rubocop/fix-wait
Fix problem with `Open3.popen3` where `confirm_documentation` task never finishes waiting for child processes
2 parents a72a32d + 9e4855f commit c155235

File tree

2 files changed

+468
-6
lines changed

2 files changed

+468
-6
lines changed

Rakefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,15 @@ end
7272

7373
desc 'Confirm documentation is up to date'
7474
task confirm_documentation: :generate_cops_documentation do
75-
_, _, _, process =
76-
Open3.popen3('git diff --exit-code docs/')
77-
78-
unless process.value.success?
79-
raise 'Please run `rake generate_cops_documentation` ' \
80-
'and add docs/ to the commit.'
75+
stdout, _stderr, status =
76+
Open3.capture3('git diff --exit-code docs/')
77+
78+
unless status.success?
79+
warn 'Documentation is out of sync:'
80+
warn stdout
81+
warn 'Please run `rake generate_cops_documentation` ' \
82+
'and add docs/ to the commit.'
83+
exit 1
8184
end
8285
end
8386

0 commit comments

Comments
 (0)