Display a warning using Vagrant's UI in case enable_nfs is set
This commit is contained in:
parent
bfdb2c53f3
commit
5c35320800
1 changed files with 9 additions and 5 deletions
|
@ -17,14 +17,18 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def enable_nfs=(value)
|
||||
puts "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."
|
||||
|
||||
@synced_folder_opts = { type: 'nfs' } if value
|
||||
# Flag to raise warning on #validate
|
||||
@_enable_nfs_set = true
|
||||
@synced_folder_opts = { type: 'nfs', nfs: true } if value
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
if enabled? && ! ALLOWED_SCOPES.include?(@scope.to_s)
|
||||
|
|
Loading…
Reference in a new issue