core: test file writes for home dir perms
Creating directories for some reason was allowed in Windows, but writes would fail later.
This commit is contained in:
parent
aabe5124c4
commit
8652d87865
|
@ -53,6 +53,8 @@ BUG FIXES:
|
|||
syntax errors.
|
||||
- core: Plugins that fork within certain actions will no longer hang
|
||||
indefinitely. [GH-2756]
|
||||
- core: Windows checks home directory permissions more correctly to
|
||||
warn of potential issues.
|
||||
- commands/box: Box add `--force` works with `--provider` flag. [GH-2757]
|
||||
- commands/plugin: Plugin installation will fail if dependencies conflict,
|
||||
rather than at runtime.
|
||||
|
|
|
@ -621,6 +621,17 @@ module Vagrant
|
|||
end
|
||||
end
|
||||
|
||||
# Attempt to write into the home directory to verify we can
|
||||
begin
|
||||
path = @home_path.join("perm_test")
|
||||
path.open("w") do |f|
|
||||
f.write("hello")
|
||||
end
|
||||
path.unlink
|
||||
rescue Errno::EACCES
|
||||
raise Errors::HomeDirectoryNotAccessible, home_path: @home_path.to_s
|
||||
end
|
||||
|
||||
# Create the version file to mark the version of the home directory
|
||||
# we're using.
|
||||
version_file = @home_path.join("setup_version")
|
||||
|
|
Loading…
Reference in New Issue