Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

disable share folder if guestpath doesn't exist

  • Loading branch information...
commit 8dbdfe3cf1e06c11b5440c2d0967e82a1a7f5ff6 1 parent 8f2d433
@avokhmin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugins/providers/virtualbox/action/share_folders.rb
View
4 plugins/providers/virtualbox/action/share_folders.rb
@@ -66,7 +66,7 @@ def create_metadata
:name => name,
:hostpath => File.expand_path(data[:hostpath], @env[:root_path]),
:transient => data[:transient]
- }
+ } if data[:guestpath] && !data[:guestpath].empty?
end
@env[:machine].provider.driver.share_folders(folders)
@@ -87,7 +87,7 @@ def mount_shared_folders
# Go through each folder and mount
folders.each do |name, data|
- unless data[:guestpath].empty?
+ if data[:guestpath] && !data[:guestpath].empty?
# Guest path specified, so mount the folder to specified point
@env[:ui].info(I18n.t("vagrant.actions.vm.share_folders.mounting_entry",
:name => name,

0 comments on commit 8dbdfe3

Please sign in to comment.
Something went wrong with that request. Please try again.