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

utils/gems: improve behaviour (particularly with Ruby 3) #16199

Merged
merged 1 commit into from Nov 9, 2023

Conversation

MikeMcQuaid
Copy link
Member

  • Use Tempfile.new with a mode argument to avoid the default behaviour of creating a file with mode 0600 (only user-readable).
  • Avoid writing the file if it already exists and the contents are unchanged.

@MikeMcQuaid MikeMcQuaid requested a review from Bo98 November 9, 2023 08:58
@MikeMcQuaid MikeMcQuaid added the critical Critical change which should be shipped as soon as possible. label Nov 9, 2023
BrewTestBot
BrewTestBot previously approved these changes Nov 9, 2023
Library/Homebrew/utils/gems.rb Outdated Show resolved Hide resolved
@MikeMcQuaid MikeMcQuaid requested a review from Bo98 November 9, 2023 12:20
@MikeMcQuaid MikeMcQuaid removed the critical Critical change which should be shipped as soon as possible. label Nov 9, 2023
Copy link
Member

@Bo98 Bo98 left a comment

Choose a reason for hiding this comment

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

Thanks!

Library/Homebrew/utils/gems.rb Outdated Show resolved Hide resolved
@Bo98 Bo98 disabled auto-merge November 9, 2023 12:54
Library/Homebrew/utils/gems.rb Outdated Show resolved Hide resolved
- Use `Tempfile.new` with a mode argument to avoid the default behaviour
  of creating a file with mode 0600 (only user-readable).
- Avoid writing the file if it already exists and the contents are
  unchanged.
@MikeMcQuaid MikeMcQuaid merged commit a808e30 into Homebrew:master Nov 9, 2023
27 checks passed
@MikeMcQuaid MikeMcQuaid deleted the utils_gems_ruby3_tweaks branch November 9, 2023 15:07
@github-actions github-actions bot added the outdated PR was locked due to age label Dec 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants