core: error-exit machine readable output type for errors [GH-2999]

This commit is contained in:
Mitchell Hashimoto 2014-02-23 22:40:45 -08:00
parent 34c000419f
commit ac9e6b2078
3 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,8 @@ FEATURES:
IMPROVEMENTS: IMPROVEMENTS:
- core: Added "error-exit" type to machine-readable output which contains
error information that caused a non-zero exit status. [GH-2999]
- guests/solaris: More accurate Solaris >= 11, < 11 detection. [GH-2824] - guests/solaris: More accurate Solaris >= 11, < 11 detection. [GH-2824]
- provisioners/chef-solo: New config `synced_folder_type` replaces the - provisioners/chef-solo: New config `synced_folder_type` replaces the
`nfs` option. This can be used to set the synced folders the provisioner `nfs` option. This can be used to set the synced folders the provisioner

View File

@ -153,6 +153,7 @@ rescue Exception => e
if env if env
opts = { :prefix => false } opts = { :prefix => false }
env.ui.error e.message, opts if e.message env.ui.error e.message, opts if e.message
env.ui.machine("error-exit", e.class.to_s, e.message.to_s)
else else
$stderr.puts "Vagrant failed to initialize at a very early stage:\n\n" $stderr.puts "Vagrant failed to initialize at a very early stage:\n\n"
$stderr.puts e.message $stderr.puts e.message

View File

@ -106,6 +106,14 @@ with the machine-readable output.
</td> </td>
</tr> </tr>
<tr>
<td>error-exit</td>
<td>
An error occured that caused Vagrant to exit. This contains that
error. Contains two data elements: type of error, error message.
</td>
</tr>
<tr> <tr>
<td>provider-name</td> <td>provider-name</td>
<td> <td>