core: parse line numbers for Vagrantfile syntax errors on Win [GH-6445]

This commit is contained in:
Mitchell Hashimoto 2015-11-20 15:34:52 -08:00
parent edcaafacb1
commit c471f37955
2 changed files with 8 additions and 1 deletions

View File

@ -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]

View File

@ -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