Skip to content

Commit

Permalink
Merge pull request #11056 from briancain/fixup-windows-config-loading…
Browse files Browse the repository at this point in the history
…-error

Ensure proper paths are shown in config loading exceptions
  • Loading branch information
briancain committed Sep 12, 2019
2 parents 2581efa + ace67cc commit 8b4ff9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/vagrant/config/loader.rb
Expand Up @@ -129,7 +129,7 @@ def load(order)
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
Expand Down
2 changes: 1 addition & 1 deletion plugins/kernel_v2/config/vm.rb
Expand Up @@ -509,7 +509,7 @@ def finalize!

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,
Expand Down

0 comments on commit 8b4ff9c

Please sign in to comment.