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

rubocop cache is not invalidated when file permissions change #4763

Closed
chrisdtaylor opened this issue Sep 18, 2017 · 1 comment
Closed

rubocop cache is not invalidated when file permissions change #4763

chrisdtaylor opened this issue Sep 18, 2017 · 1 comment

Comments

@chrisdtaylor
Copy link

chrisdtaylor commented Sep 18, 2017

The Lint/ScriptPermission Cop checks that files that have a shebang line as their first line also have execute permissions. However, just adding execute permissions to the file does NOT invalidate the rubocop cache, so the check continues to fail.


Expected behavior

Rubocop caches should be invalidated for any kind of file change, including permission changes.

Actual behavior

Permission changes do not invalidate the cache, meaning correcting Lint/ScriptPermission cop violations by adding execute permission to a file does not satisfy the cop unless the cache is manually invalidated or deleted.

Steps to reproduce the problem

create a script with a #! line and without execute permissions
run rubocop on it
fix permissions
run rubocop again
boom

Rubocop Version:

rubocop -V
0.49.1 (using Parser 2.4.0.0, running on ruby 2.3.0 x86_64-linux)

@pocke
Copy link
Collaborator

pocke commented Sep 24, 2017

This problem has been fixed already.
#4530
#4469

@pocke pocke closed this as completed Sep 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants