From 8e9720c5b93eea36652bd5011615e7f18fd240fb Mon Sep 17 00:00:00 2001 From: Naren Date: Fri, 14 Oct 2016 12:21:35 -0500 Subject: [PATCH 1/4] updated cmd to point to prebug steps url --- Library/Homebrew/cask/lib/hbc/utils.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb index d42d78ef70..ef4afa05bf 100644 --- a/Library/Homebrew/cask/lib/hbc/utils.rb +++ b/Library/Homebrew/cask/lib/hbc/utils.rb @@ -4,7 +4,7 @@ require "stringio" require "hbc/utils/file" -UPDATE_CMD = "brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup".freeze +PREBUG_URL = "https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md".freeze ISSUES_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze # monkeypatch Object - not a great idea @@ -145,8 +145,9 @@ module Hbc def self.error_message_with_suggestions <<-EOS.undent - Most likely, this means you have an outdated version of Homebrew-Cask. Please run: - #{UPDATE_CMD} + + Try following the instuctions here: + #{Formatter.url(PREBUG_URL)} If this doesn’t fix the problem, please report this bug: #{Formatter.url(ISSUES_URL)} From 29d81fc6477547390330f2b1cb1810aa185a06ac Mon Sep 17 00:00:00 2001 From: Naren Date: Mon, 17 Oct 2016 11:31:54 -0500 Subject: [PATCH 2/4] updating DSL test --- Library/Homebrew/cask/test/cask/dsl_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb index d3361080b1..2d51a20f13 100644 --- a/Library/Homebrew/cask/test/cask/dsl_test.rb +++ b/Library/Homebrew/cask/test/cask/dsl_test.rb @@ -26,7 +26,7 @@ describe Hbc::DSL do .* Unexpected method 'future_feature' called on Cask unexpected-method-cask\\. .* - brew update; brew cleanup; brew cask cleanup + https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md .* https://github.com/caskroom/homebrew-cask#reporting-bugs EOS From 6ac54f297f0a45b076f36d39f9e36f3adcb951a7 Mon Sep 17 00:00:00 2001 From: Naren Date: Mon, 17 Oct 2016 15:28:40 -0500 Subject: [PATCH 3/4] remove empty line and concatenate newline to e.message in cli.rb --- Library/Homebrew/cask/lib/hbc/cli.rb | 2 +- Library/Homebrew/cask/lib/hbc/utils.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index 2173a52d00..ad8c02aabe 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -152,7 +152,7 @@ module Hbc onoe msg exit 1 rescue StandardError, ScriptError, NoMemoryError => e - msg = e.message + msg = "#{e.message}\n" msg << Utils.error_message_with_suggestions msg << e.backtrace.join("\n") onoe msg diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb index ef4afa05bf..36679aa391 100644 --- a/Library/Homebrew/cask/lib/hbc/utils.rb +++ b/Library/Homebrew/cask/lib/hbc/utils.rb @@ -145,8 +145,7 @@ module Hbc def self.error_message_with_suggestions <<-EOS.undent - - Try following the instuctions here: + Try following the instuctions here: #{Formatter.url(PREBUG_URL)} If this doesn’t fix the problem, please report this bug: From 5f2929788ce3434bab36d6aaea390261a8461706 Mon Sep 17 00:00:00 2001 From: Naren Date: Mon, 17 Oct 2016 20:59:17 -0500 Subject: [PATCH 4/4] following to follow --- Library/Homebrew/cask/lib/hbc/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb index 36679aa391..c2c0916984 100644 --- a/Library/Homebrew/cask/lib/hbc/utils.rb +++ b/Library/Homebrew/cask/lib/hbc/utils.rb @@ -145,7 +145,7 @@ module Hbc def self.error_message_with_suggestions <<-EOS.undent - Try following the instuctions here: + Follow the instuctions here: #{Formatter.url(PREBUG_URL)} If this doesn’t fix the problem, please report this bug: