We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
rubocop will fail if it can't write to the cache-root directory even if you specify --cache=false
--cache=false
When caching is disabled, rubocop should not crash if it can't write to the cache root.
rubocop crashes with the error /usr/local/lib/ruby/3.1.0/fileutils.rb:243:in mkdir': Permission denied @ dir_s_mkdir - /.cache (Errno::EACCES)`
/usr/local/lib/ruby/3.1.0/fileutils.rb:243:in
$ docker run --rm -it --user 1000 ruby:3.1 bash -c 'gem install rubocop && rubocop --debug --cache=false' Fetching rubocop-ast-1.27.0.gem Fetching regexp_parser-2.7.0.gem Fetching unicode-display_width-2.4.2.gem Fetching rainbow-3.1.1.gem Fetching ruby-progressbar-1.13.0.gem Fetching ast-2.4.2.gem Fetching parser-3.2.1.1.gem Fetching parallel-1.22.1.gem Fetching rubocop-1.48.1.gem Successfully installed unicode-display_width-2.4.2 Successfully installed ruby-progressbar-1.13.0 Successfully installed ast-2.4.2 Successfully installed parser-3.2.1.1 Successfully installed rubocop-ast-1.27.0 Successfully installed regexp_parser-2.7.0 Successfully installed rainbow-3.1.1 Successfully installed parallel-1.22.1 Successfully installed rubocop-1.48.1 9 gems installed /usr/local/lib/ruby/3.1.0/fileutils.rb:243:in `mkdir': Permission denied @ dir_s_mkdir - /.cache (Errno::EACCES) from /usr/local/lib/ruby/3.1.0/fileutils.rb:243:in `fu_mkdir' from /usr/local/lib/ruby/3.1.0/fileutils.rb:221:in `block (2 levels) in mkdir_p' from /usr/local/lib/ruby/3.1.0/fileutils.rb:219:in `reverse_each' from /usr/local/lib/ruby/3.1.0/fileutils.rb:219:in `block in mkdir_p' from /usr/local/lib/ruby/3.1.0/fileutils.rb:211:in `each' from /usr/local/lib/ruby/3.1.0/fileutils.rb:211:in `mkdir_p' from /usr/local/lib/ruby/3.1.0/pathname.rb:585:in `mkpath' from /usr/local/bundle/gems/rubocop-1.48.1/lib/rubocop/server/cache.rb:46:in `block in dir' from <internal:kernel>:90:in `tap' from /usr/local/bundle/gems/rubocop-1.48.1/lib/rubocop/server/cache.rb:45:in `dir' from /usr/local/bundle/gems/rubocop-1.48.1/lib/rubocop/server/cache.rb:98:in `pid_path' from /usr/local/bundle/gems/rubocop-1.48.1/lib/rubocop/server/cache.rb:118:in `pid_running?' from /usr/local/bundle/gems/rubocop-1.48.1/lib/rubocop/server.rb:36:in `running?' from /usr/local/bundle/gems/rubocop-1.48.1/exe/rubocop:11:in `<top (required)>' from /usr/local/bundle/bin/rubocop:25:in `load' from /usr/local/bundle/bin/rubocop:25:in `<main>'
The text was updated successfully, but these errors were encountered:
[Fix rubocop#11725] Fix an error when accessing cache directory
ce05af4
Fixes rubocop#11725. This PR fixes an error when insufficient permissions to server cache dir are granted.
[Fix #11725] Fix an error when accessing cache directory
0102e57
Fixes #11725. This PR fixes an error when insufficient permissions to server cache dir are granted.
Successfully merging a pull request may close this issue.
rubocop will fail if it can't write to the cache-root directory even if you specify
--cache=false
Expected behavior
When caching is disabled, rubocop should not crash if it can't write to the cache root.
Actual behavior
rubocop crashes with the error
/usr/local/lib/ruby/3.1.0/fileutils.rb:243:in
mkdir': Permission denied @ dir_s_mkdir - /.cache (Errno::EACCES)`Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: