Skip to content

Commit

Permalink
Workaround for mingw build error
Browse files Browse the repository at this point in the history
This PR skips the following build error of formatter_set_spec.rb in the windows mingw CI matrix.

```console
Failures:

  1) RuboCop::Formatter::FormatterSet add_formatter when output path is specified when parent directories don't exist creates them
     Failure/Error: after { FileUtils.rm_rf(tmpdir) }

     Errno::EACCES:
       Permission denied @ apply2files - D:/a/_temp/d20220824-1696-gdx8qj/path/does/not/exist
     # ./spec/rubocop/formatter/formatter_set_spec.rb:60:in `block (5 levels) in <top (required)>'
     # tasks/spec_runner.rake:40:in `block in run_specs'
     # tasks/spec_runner.rake:52:in `with_encoding'
     # tasks/spec_runner.rake:36:in `run_specs'
     # tasks/spec_runner.rake:165:in `block in <top (required)>'

Finished in 2 minutes 34.9 seconds (files took 3.68 seconds to load)
18699 examples, 1 failure, 15 pending
```

https://github.com/rubocop/rubocop/runs/7986996059
  • Loading branch information
koic committed Aug 25, 2022
1 parent 3ccbf3a commit b700baa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/rubocop/formatter/formatter_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
after { FileUtils.rm_rf(tmpdir) }

it 'creates them' do
# FIXME: Skips this spec to prevent `Errno::EACCES` error in mingw CI matrix.
skip if ENV['GITHUB_JOB'] == 'main' && ENV['MSYSTEM'] == 'MINGW64'

output_path = File.join(tmpdir, 'path/does/not/exist')
formatter_set.add_formatter('simple', output_path)
expect(formatter_set.first.output.class).to eq(File)
Expand Down

0 comments on commit b700baa

Please sign in to comment.