Merge pull request #11056 from briancain/fixup-windows-config-loading-error

Ensure proper paths are shown in config loading exceptions
This commit is contained in:
Brian Cain 2019-09-12 08:47:12 -07:00 committed by GitHub
commit 8b4ff9c40f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ module Vagrant
path = "(unknown)"
if e.backtrace && e.backtrace[0]
backtrace_tokens = e.backtrace[0].split(":")
path = backtrace_tokens[0]
path = e.backtrace.first.slice(0, e.backtrace.first.rindex(':')).rpartition(':').first
backtrace_tokens.each do |part|
if part =~ /\d+/
line = part.to_i

View File

@ -509,7 +509,7 @@ module VagrantPlugins
line = "(unknown)"
if e.backtrace && e.backtrace[0]
line = e.backtrace[0].split(":")[1]
line = e.backtrace.first.slice(0, e.backtrace.first.rindex(':')).rpartition(':').last
end
raise Vagrant::Errors::VagrantfileLoadError,