Make powershell error generalized
This commit is contained in:
parent
f330f81fbf
commit
81cbdae62a
|
@ -552,6 +552,10 @@ module Vagrant
|
||||||
error_key(:powershell_invalid_version)
|
error_key(:powershell_invalid_version)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class PowerShellError < VagrantError
|
||||||
|
error_key(:powershell_error, "vagrant_ps.errors.powershell_error")
|
||||||
|
end
|
||||||
|
|
||||||
class ProviderCantInstall < VagrantError
|
class ProviderCantInstall < VagrantError
|
||||||
error_key(:provider_cant_install)
|
error_key(:provider_cant_install)
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,7 +15,7 @@ module VagrantPlugins
|
||||||
script_path = File.expand_path("../../scripts/host_info.ps1", __FILE__)
|
script_path = File.expand_path("../../scripts/host_info.ps1", __FILE__)
|
||||||
r = Vagrant::Util::PowerShell.execute(script_path)
|
r = Vagrant::Util::PowerShell.execute(script_path)
|
||||||
if r.exit_code != 0
|
if r.exit_code != 0
|
||||||
raise Errors::PowershellError,
|
raise Vagrant::Errors::PowerShellError,
|
||||||
script: script_path,
|
script: script_path,
|
||||||
stderr: r.stderr
|
stderr: r.stderr
|
||||||
end
|
end
|
||||||
|
|
|
@ -49,16 +49,6 @@ en:
|
||||||
|
|
||||||
As another option, you can manually specify an IP for the machine
|
As another option, you can manually specify an IP for the machine
|
||||||
to mount from using the `smb_host` option to the synced folder.
|
to mount from using the `smb_host` option to the synced folder.
|
||||||
powershell_error: |-
|
|
||||||
An error occurred while executing a PowerShell script. This error
|
|
||||||
is shown below. Please read the error message and see if this is
|
|
||||||
a configuration error with your system. If it is not, then please
|
|
||||||
report a bug.
|
|
||||||
|
|
||||||
Script: %{script}
|
|
||||||
Error:
|
|
||||||
|
|
||||||
%{stderr}
|
|
||||||
powershell_version: |-
|
powershell_version: |-
|
||||||
PowerShell version 3 or later is required for SMB synced folders
|
PowerShell version 3 or later is required for SMB synced folders
|
||||||
to work on Windows. You have version: '%{version}'. Please update
|
to work on Windows. You have version: '%{version}'. Please update
|
||||||
|
|
Loading…
Reference in New Issue