diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cfe725dd..d42bd7238 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,8 @@ BUG FIXES: - core: more robust check for admin privs on Windows [GH-5616] - core: properly detect when HTTP server doesn't support byte ranges and retry from scratch [GH-4479] + - core: line numbers show properly in Vagrantfile syntax errors + on Windows [GH-6445] - commands/box: the update command supports CA settings [GH-4473] - commands/box: removing all versions and providers of a box will properly clean all directories in `~/.vagrant.d/boxes` [GH-3570] diff --git a/lib/vagrant/config/loader.rb b/lib/vagrant/config/loader.rb index ef4abe4bd..2bf011231 100644 --- a/lib/vagrant/config/loader.rb +++ b/lib/vagrant/config/loader.rb @@ -221,7 +221,12 @@ module Vagrant line = "(unknown)" if e.backtrace && e.backtrace[0] - line = e.backtrace[0].split(":")[1] + e.backtrace[0].split(":").each do |part| + if part =~ /\d+/ + line = part.to_i + break + end + end end # Report the generic exception