Merge pull request #688 from schisamo/transient-shared-folder-support
add vbox driver support for creating transient shared folders
This commit is contained in:
commit
e9ae63f3b5
|
@ -63,7 +63,8 @@ module Vagrant
|
|||
shared_folders.each do |name, data|
|
||||
folders << {
|
||||
:name => name,
|
||||
:hostpath => File.expand_path(data[:hostpath], @env[:root_path])
|
||||
:hostpath => File.expand_path(data[:hostpath], @env[:root_path]),
|
||||
:transient => data[:transient]
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ Please change your configurations to match this new syntax.
|
|||
:owner => nil,
|
||||
:group => nil,
|
||||
:nfs => false,
|
||||
:transient => false,
|
||||
:extra => nil
|
||||
}.merge(opts || {})
|
||||
end
|
||||
|
|
|
@ -392,8 +392,12 @@ module Vagrant
|
|||
|
||||
def share_folders(folders)
|
||||
folders.each do |folder|
|
||||
execute("sharedfolder", "add", @uuid, "--name",
|
||||
folder[:name], "--hostpath", folder[:hostpath])
|
||||
args = ["--name",
|
||||
folder[:name],
|
||||
"--hostpath",
|
||||
folder[:hostpath]]
|
||||
args << "--transient" if folder.has_key?(:transient) && folder[:transient]
|
||||
execute("sharedfolder", "add", @uuid, *args)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -392,8 +392,12 @@ module Vagrant
|
|||
|
||||
def share_folders(folders)
|
||||
folders.each do |folder|
|
||||
execute("sharedfolder", "add", @uuid, "--name",
|
||||
folder[:name], "--hostpath", folder[:hostpath])
|
||||
args = ["--name",
|
||||
folder[:name],
|
||||
"--hostpath",
|
||||
folder[:hostpath]]
|
||||
args << "--transient" if folder.has_key?(:transient) && folder[:transient]
|
||||
execute("sharedfolder", "add", @uuid, *args)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue