Display a warning using Vagrant's UI in case enable_nfs is set
This commit is contained in:
parent
fccd43d8e2
commit
e4f6dd69e4
1 changed files with 9 additions and 5 deletions
|
@ -17,14 +17,18 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
def enable_nfs=(value)
|
def enable_nfs=(value)
|
||||||
puts "The `enable_nfs` config for vagrant-cachier has been deprecated " \
|
# Flag to raise warning on #validate
|
||||||
"and will be removed on 0.7.0, please use " \
|
@_enable_nfs_set = true
|
||||||
"`synced_folder_opts = { type: 'nfs' }` instead."
|
@synced_folder_opts = { type: 'nfs', nfs: true } if value
|
||||||
|
|
||||||
@synced_folder_opts = { type: 'nfs' } if value
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate(machine)
|
def validate(machine)
|
||||||
|
if @_enable_nfs_set
|
||||||
|
machine.ui.warn "The `enable_nfs` config for vagrant-cachier has been deprecated " \
|
||||||
|
"and will be removed on 0.7.0, please use " \
|
||||||
|
"`synced_folder_opts = { type: 'nfs' }` instead."
|
||||||
|
end
|
||||||
|
|
||||||
errors = _detected_errors
|
errors = _detected_errors
|
||||||
|
|
||||||
if enabled? && ! ALLOWED_SCOPES.include?(@scope.to_s)
|
if enabled? && ! ALLOWED_SCOPES.include?(@scope.to_s)
|
||||||
|
|
Loading…
Reference in a new issue