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:
commit
8b4ff9c40f
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue