diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-11-29 19:32:56 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-11-30 09:04:48 -0600 |
commit | 4d6a5cbf1ca2648896d696ab97bc366cf07c7b01 (patch) | |
tree | d83bffed7924884b9d64fbc22fb4d50a7f9a8363 | |
parent | e64bbab4830b3b6ef3cb7105165b923b163fab3d (diff) | |
download | bundler-4d6a5cbf1ca2648896d696ab97bc366cf07c7b01.tar.gz |
[FriendlyErrors] Use GFM in issue report template
-rw-r--r-- | lib/bundler/env.rb | 2 | ||||
-rw-r--r-- | lib/bundler/friendly_errors.rb | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb index 8eea663bfa..0b51c6c4a4 100644 --- a/lib/bundler/env.rb +++ b/lib/bundler/env.rb @@ -41,7 +41,7 @@ module Bundler return out unless SharedHelpers.in_bundle? if print_gemfile - out << "## Gemfile\n" + out << "\n## Gemfile\n" out << "\n### `#{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)}`\n\n" out << "```ruby\n" << read_file(Bundler.default_gemfile).chomp << "\n```\n" diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb index c2853294a7..911c08f714 100644 --- a/lib/bundler/friendly_errors.rb +++ b/lib/bundler/friendly_errors.rb @@ -71,12 +71,14 @@ module Bundler Instead, what happened was... - Error details + ## Backtrace - #{e.class}: #{e.message} - #{e.backtrace && e.backtrace.join("\n ")} + ``` + #{e.class}: #{e.message} + #{e.backtrace && e.backtrace.join("\n ").chomp} + ``` - #{Bundler::Env.new.report(:print_gemfile => false, :print_gemspecs => false).gsub(/\n/, "\n ").strip} + #{Bundler::Env.new.report(:print_gemfile => false, :print_gemspecs => false)} --- TEMPLATE END ---------------------------------------------------------------- EOS |