diff options
| author | Markus Reiter | 2018-01-27 23:29:55 +0100 | 
|---|---|---|
| committer | Markus Reiter | 2018-01-28 07:00:20 +0100 | 
| commit | 884c57f9f4ed44096e46c1e0510cce89e15b2477 (patch) | |
| tree | 544c16b03f1a50a205f04129b7614f84f4cec793 | |
| parent | d558ec09332c74927dfb9182b19e11c5a73d8b52 (diff) | |
| download | brew-884c57f9f4ed44096e46c1e0510cce89e15b2477.tar.bz2 | |
Fix `brew cask style` on Travis.
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/style.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/style_spec.rb | 7 | 
2 files changed, 9 insertions, 6 deletions
| diff --git a/Library/Homebrew/cask/lib/hbc/cli/style.rb b/Library/Homebrew/cask/lib/hbc/cli/style.rb index 86fc98eaa..bf7ffb62d 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/style.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/style.rb @@ -10,9 +10,9 @@ module Hbc        def run          install_rubocop          cache_env = { "XDG_CACHE_HOME" => "#{HOMEBREW_CACHE}/style" } -        system(cache_env, "rubocop", *rubocop_args, "--", *cask_paths) +        hide_warnings = debug? ? [] : [ENV["HOMEBREW_RUBY_PATH"], "-W0", "-S"] +        system(cache_env, *hide_warnings, "rubocop", *rubocop_args, "--", *cask_paths)          raise CaskError, "style check failed" unless $CHILD_STATUS.success? -        true        end        def install_rubocop @@ -43,8 +43,8 @@ module Hbc          [            "--require", "rubocop-cask",            "--force-default-config", -          "--force-exclusion", -          "--format", "simple" +          "--format", "simple", +          "--parallel"          ]        end diff --git a/Library/Homebrew/test/cask/cli/style_spec.rb b/Library/Homebrew/test/cask/cli/style_spec.rb index 12cd348a0..850f04f8d 100644 --- a/Library/Homebrew/test/cask/cli/style_spec.rb +++ b/Library/Homebrew/test/cask/cli/style_spec.rb @@ -22,7 +22,10 @@ describe Hbc::CLI::Style, :cask do      context "when rubocop succeeds" do        let(:success) { true } -      it { is_expected.to be_truthy } + +      it "does not raise an error" do +        expect { subject }.not_to raise_error +      end      end      context "when rubocop fails" do @@ -132,7 +135,7 @@ describe Hbc::CLI::Style, :cask do    describe "#default_args" do      subject { cli.default_args } -    it { is_expected.to include("--require", "rubocop-cask", "--format", "simple", "--force-exclusion") } +    it { is_expected.to include("--require", "rubocop-cask", "--format", "simple") }    end    describe "#autocorrect_args" do | 
