aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJosh Hagins2016-10-18 11:00:07 -0400
committerGitHub2016-10-18 11:00:07 -0400
commitb6a0fdd357a907f5903e3c07d502155de70e6898 (patch)
tree4ca1149ffe4211012bbad160d57db0622341437b /Library
parent2da012d84d81dad61b7a5e071c9f827c822a6fed (diff)
parent5f2929788ce3434bab36d6aaea390261a8461706 (diff)
downloadbrew-b6a0fdd357a907f5903e3c07d502155de70e6898.tar.bz2
Merge pull request #1312 from narendasan/cask_update_error_msgs
Cask update error msgs
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils.rb6
-rw-r--r--Library/Homebrew/cask/test/cask/dsl_test.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index 2173a52d0..ad8c02aab 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 d42d78ef7..c2c091698 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,8 @@ 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}
+ Follow the instuctions here:
+ #{Formatter.url(PREBUG_URL)}
If this doesn’t fix the problem, please report this bug:
#{Formatter.url(ISSUES_URL)}
diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb
index d3361080b..2d51a20f1 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