diff options
| author | Markus Reiter | 2016-10-11 15:10:12 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-11 15:10:12 +0200 |
| commit | 9eaf221885c6340ce5a737b54d8d6bb652c197bb (patch) | |
| tree | cf1f270d0ae065fdc3f4d6ef34728c317838774b | |
| parent | 04ccba54896b249f6a041465588e8d371a82d4bb (diff) | |
| download | brew-9eaf221885c6340ce5a737b54d8d6bb652c197bb.tar.bz2 | |
Allow auditing of a single language of a cask.
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/auditor.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/auditor.rb b/Library/Homebrew/cask/lib/hbc/auditor.rb index d6846080b..b112fd0ed 100644 --- a/Library/Homebrew/cask/lib/hbc/auditor.rb +++ b/Library/Homebrew/cask/lib/hbc/auditor.rb @@ -1,15 +1,16 @@ module Hbc class Auditor def self.audit(cask, audit_download: false, check_token_conflicts: false) - if languages_blocks = cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks) + if !ARGV.value("language") && + languages_blocks = cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks) begin saved_languages = MacOS.instance_variable_get(:@languages) languages_blocks.keys.map { |languages| ohai "Auditing language: #{languages.map { |lang| "'#{lang}'" }.join(", ")}" MacOS.instance_variable_set(:@languages, languages) - CLI::Cleanup.run(cask.token) if audit_download audit_cask_instance(Hbc.load(cask.sourcefile_path), audit_download, check_token_conflicts) + CLI::Cleanup.run(cask.token) if audit_download }.all? ensure MacOS.instance_variable_set(:@languages, saved_languages) |
