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

create cache file as 0644 #4210

Merged
merged 2 commits into from
Jul 29, 2018
Merged

create cache file as 0644 #4210

merged 2 commits into from
Jul 29, 2018

Conversation

kivikakk
Copy link
Contributor

Set the cache file to mode 0644 so group users can read it. This was the behaviour pre-#4195; TempFile insists on creating its files as 0600 instead of according to the umask.

/cc @lildude @mhagger

@kivikakk
Copy link
Contributor Author

Would anyone be running git-linguist on Windows? FileUtils.chmod is meant to be a no-op on Windows, but I've read reports of it throwing when used in a UNC share or other non-standard places.

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and fixes the issue. I can't comment on the Windows side of things though.

bin/git-linguist Outdated
Linguist v#{Linguist::VERSION}
Detect language type and determine language breakdown for a given Git repository.
Linguist v#{Linguist::VERSION}
Detect language type and determine language breakdown for a given Git repository.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't <<~HELP (with a tilde) be preferable to stripping the indentation entirely? (I forget which Ruby version the tilde syntax was introduced in, so correct me if using <<~ would introduce compatibility issues).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know the tilde version existed nor what version it was introduced in! I'll find out 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lowest Ruby version we ask Travis to run CI checks on is 2.3.3, and <<~ functions correctly there, so I'll use that. Thanks! ❤️

@kivikakk kivikakk merged commit f9ca0dc into master Jul 29, 2018
@kivikakk kivikakk deleted the cache-0644 branch July 29, 2018 23:55
@kivikakk kivikakk mentioned this pull request Jul 30, 2018
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants