Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Allow turning off default shared folders
Browse files Browse the repository at this point in the history
  • Loading branch information
ercanozkaya committed Aug 27, 2013
1 parent 3b1b9ed commit 448a314
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _config = {
begin
deep_merge!(_config, YAML.load(File.open(File.join(File.dirname(__FILE__), "config.custom.yaml"), File::RDONLY).read))
rescue Errno::ENOENT
# No vagrantconfig_local.yaml found -- that's OK; just use the defaults.
# No config.custom.yaml found -- that's OK; just use the defaults.
end

CONF = _config
Expand All @@ -40,7 +40,9 @@ Vagrant.configure("2") do |config|

if CONF.has_key?('synced_folders')
CONF['synced_folders'].each { |target, source|
config.vm.synced_folder source, target, :nfs => CONF['nfs'], :create => true
if source
config.vm.synced_folder source, target, :nfs => CONF['nfs'], :create => true
end
}
end

Expand Down
6 changes: 4 additions & 2 deletions Vagrantfile.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _config = {
begin
deep_merge!(_config, YAML.load(File.open(File.join(File.dirname(__FILE__), "config.custom.yaml"), File::RDONLY).read))
rescue Errno::ENOENT
# No vagrantconfig_local.yaml found -- that's OK; just use the defaults.
# No config.custom.yaml found -- that's OK; just use the defaults.
end

CONF = _config
Expand All @@ -30,7 +30,9 @@ Vagrant.configure("2") do |config|

if CONF.has_key?('synced_folders')
CONF['synced_folders'].each { |target, source|
config.vm.synced_folder source, target, :nfs => CONF['nfs'], :create => true
if source
config.vm.synced_folder source, target, :nfs => CONF['nfs'], :create => true
end
}
end
end

0 comments on commit 448a314

Please sign in to comment.