From d984ce06f2af43092c576edcab1e1663c4e9b281 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 25 Jan 2023 16:05:02 +0000 Subject: [PATCH] Improve Codespaces behaviour - ensure that homebrew/core is always tapped - make RuboCop stop complaining about permissions --- .devcontainer/on-create-command.sh | 3 +++ Library/Homebrew/rubocops/files.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.devcontainer/on-create-command.sh b/.devcontainer/on-create-command.sh index 63285db4c5..c5a5666bdb 100755 --- a/.devcontainer/on-create-command.sh +++ b/.devcontainer/on-create-command.sh @@ -21,6 +21,9 @@ brew install shellcheck shfmt gh gnu-tar # cleanup any mess brew cleanup +# actually tap homebrew/core, no longer done by default +brew tap homebrew/core + # install some useful development things sudo apt-get update diff --git a/Library/Homebrew/rubocops/files.rb b/Library/Homebrew/rubocops/files.rb index 7ee1de87d5..63d3d7566a 100644 --- a/Library/Homebrew/rubocops/files.rb +++ b/Library/Homebrew/rubocops/files.rb @@ -13,6 +13,9 @@ module RuboCop def audit_formula(node, _class_node, _parent_class_node, _body_node) 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) actual_mode = File.stat(file_path).mode # Check that the file is world-readable.