synced_folders/smb: raise error if not windows
This commit is contained in:
parent
0fe4a4af26
commit
a50421c54c
|
@ -17,6 +17,10 @@ module VagrantPlugins
|
||||||
class PowershellError < SMBError
|
class PowershellError < SMBError
|
||||||
error_key(:powershell_error)
|
error_key(:powershell_error)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class WindowsHostRequired < SMBError
|
||||||
|
error_key(:windows_host_required)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def usable?(machine, raise_error=false)
|
def usable?(machine, raise_error=false)
|
||||||
if !Vagrant::Util::Platform.windows?
|
if !Vagrant::Util::Platform.windows?
|
||||||
# TODO: raise error if specified
|
raise Errors::WindowsHostRequired if raise_error
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -37,3 +37,7 @@ en:
|
||||||
Error:
|
Error:
|
||||||
|
|
||||||
%{stderr}
|
%{stderr}
|
||||||
|
windows_host_required: |-
|
||||||
|
SMB shared folders are only available when Vagrant is running
|
||||||
|
on Windows. The guest machine can be running non-Windows. Please use
|
||||||
|
another synced folder type.
|
||||||
|
|
Loading…
Reference in New Issue