Merge pull request #1312 from narendasan/cask_update_error_msgs
Cask update error msgs
This commit is contained in:
commit
b6a0fdd357
@ -152,7 +152,7 @@ module Hbc
|
|||||||
onoe msg
|
onoe msg
|
||||||
exit 1
|
exit 1
|
||||||
rescue StandardError, ScriptError, NoMemoryError => e
|
rescue StandardError, ScriptError, NoMemoryError => e
|
||||||
msg = e.message
|
msg = "#{e.message}\n"
|
||||||
msg << Utils.error_message_with_suggestions
|
msg << Utils.error_message_with_suggestions
|
||||||
msg << e.backtrace.join("\n")
|
msg << e.backtrace.join("\n")
|
||||||
onoe msg
|
onoe msg
|
||||||
|
|||||||
@ -4,7 +4,7 @@ require "stringio"
|
|||||||
|
|
||||||
require "hbc/utils/file"
|
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
|
ISSUES_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze
|
||||||
|
|
||||||
# monkeypatch Object - not a great idea
|
# monkeypatch Object - not a great idea
|
||||||
@ -145,8 +145,8 @@ module Hbc
|
|||||||
|
|
||||||
def self.error_message_with_suggestions
|
def self.error_message_with_suggestions
|
||||||
<<-EOS.undent
|
<<-EOS.undent
|
||||||
Most likely, this means you have an outdated version of Homebrew-Cask. Please run:
|
Follow the instuctions here:
|
||||||
#{UPDATE_CMD}
|
#{Formatter.url(PREBUG_URL)}
|
||||||
|
|
||||||
If this doesn’t fix the problem, please report this bug:
|
If this doesn’t fix the problem, please report this bug:
|
||||||
#{Formatter.url(ISSUES_URL)}
|
#{Formatter.url(ISSUES_URL)}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ describe Hbc::DSL do
|
|||||||
.*
|
.*
|
||||||
Unexpected method 'future_feature' called on Cask unexpected-method-cask\\.
|
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
|
https://github.com/caskroom/homebrew-cask#reporting-bugs
|
||||||
EOS
|
EOS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user