Improve Codespaces behaviour

- ensure that homebrew/core is always tapped
- make RuboCop stop complaining about permissions
This commit is contained in:
Mike McQuaid 2023-01-25 16:05:02 +00:00 committed by GitHub
parent b4510401bd
commit d984ce06f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,9 @@ brew install shellcheck shfmt gh gnu-tar
# cleanup any mess # cleanup any mess
brew cleanup brew cleanup
# actually tap homebrew/core, no longer done by default
brew tap homebrew/core
# install some useful development things # install some useful development things
sudo apt-get update sudo apt-get update

View File

@ -13,6 +13,9 @@ module RuboCop
def audit_formula(node, _class_node, _parent_class_node, _body_node) def audit_formula(node, _class_node, _parent_class_node, _body_node)
return unless file_path return unless file_path
# Codespaces routinely screws up all permissions so don't complain there.
return if ENV["CODESPACES"] || ENV["HOMEBREW_CODESPACES"]
offending_node(node) offending_node(node)
actual_mode = File.stat(file_path).mode actual_mode = File.stat(file_path).mode
# Check that the file is world-readable. # Check that the file is world-readable.