diff options
author | Andre Arko <andre@arko.net> | 2015-05-02 22:54:10 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-05-02 22:54:10 -0700 |
commit | c3d6f425f6830e243660e05f1d95d5ab388d2dde (patch) | |
tree | e77c47af1c865a9b9393c4b38b0f8cf359a8a2ed | |
parent | 8b5a492b42f5f28a060d5ba04327bae2b902b0d6 (diff) | |
download | bundler-c3d6f425f6830e243660e05f1d95d5ab388d2dde.tar.gz |
[friendly errors] flesh out reporting template
-rw-r--r-- | lib/bundler/cli/exec.rb | 1 | ||||
-rw-r--r-- | lib/bundler/friendly_errors.rb | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb index 7713906f..bb3c7412 100644 --- a/lib/bundler/cli/exec.rb +++ b/lib/bundler/cli/exec.rb @@ -3,6 +3,7 @@ module Bundler attr_reader :options, :args, :cmd def initialize(options, args) + raise "wat" @options = options @cmd = args.shift @args = args diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb index 3bddadd0..7a789096 100644 --- a/lib/bundler/friendly_errors.rb +++ b/lib/bundler/friendly_errors.rb @@ -42,18 +42,23 @@ module Bundler def self.request_issue_report_for(e) Bundler.ui.info <<-EOS.gsub(/^ {6}/, '') #{'――― ERROR REPORT TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――'} - Command + - What did you do? - #{$PROGRAM_NAME} #{ARGV.join(' ')} + I ran the command `#{$PROGRAM_NAME} #{ARGV.join(' ')}` - - What did you do? - What did you expect to happen? + + I expected Bundler to... + - What happened instead? + Instead, what actually happened was... + + Error details #{e.class}: #{e.message} - #{e.backtrace.join("\n ")} + #{e.backtrace.join("\n ")} #{Bundler::Env.new.report(:print_gemfile => false).gsub(/\n/, "\n ").strip} #{'――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'} |