【发布时间】:2017-06-06 12:42:52
【问题描述】:
我想允许将参数附加到config.vm.synced_folder。我希望用户在此配置中附加额外的参数。
到目前为止:
append_params = 'x: false, y: false'
config.vm.synced_folder x['folder'], "/var/www", create: true, type: "nfs", append_params
如果我删除 , append_params 它会起作用。但是有了它,它会失败并出现错误:
There is a syntax error in the following Vagrantfile. The syntax error
message is reproduced below for convenience:
D:/x/Vagrantfile:32: syntax error, unexpected '\n', expecting =>
如何根据请求将其他参数附加到config.vm.synced_folder?
【问题讨论】:
-
使
append_params成为Hash例如append_params = {x: false, y: false}然后**append_params在第 2 行