From 2eb908a9fbaea5c10f7d6634f7a445cadfa116ab Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 27 Feb 2020 10:36:10 +0000 Subject: [PATCH] dev-cmd/extract: allow maintainers to extract to core. I was wanting to do this today to add `ruby@2.6` and it's a social rather than technical requirement (i.e. we don't want users to mess with their homebrew/core unless they know what they are doing) so allow overriding with `HOMEBREW_DEVELOPER` set. --- Library/Homebrew/dev-cmd/extract.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/extract.rb b/Library/Homebrew/dev-cmd/extract.rb index d79ed4a323..df9c41b2ee 100644 --- a/Library/Homebrew/dev-cmd/extract.rb +++ b/Library/Homebrew/dev-cmd/extract.rb @@ -111,8 +111,10 @@ module Homebrew end destination_tap = Tap.fetch(args.remaining.second) - odie "Cannot extract formula to homebrew/core!" if destination_tap.core_tap? - odie "Cannot extract formula to the same tap!" if destination_tap == source_tap + unless ARGV.homebrew_developer? + odie "Cannot extract formula to homebrew/core!" if destination_tap.core_tap? + odie "Cannot extract formula to the same tap!" if destination_tap == source_tap + end destination_tap.install unless destination_tap.installed? repo = source_tap.path