synced_folders/smb: raise error if not windows

This commit is contained in:
Mitchell Hashimoto 2014-02-26 15:58:43 -08:00
parent 0fe4a4af26
commit a50421c54c
3 changed files with 9 additions and 1 deletions

View File

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

View File

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

View File

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