Make name required for defining non-primary disks
This commit is contained in:
parent
ec350861cd
commit
ffe8fcef9b
@ -110,9 +110,8 @@ module VagrantPlugins
|
||||
@name = "vagrant_primary"
|
||||
else
|
||||
# TODO: Can't rely on `id` because it changes in between vagrant runs
|
||||
#
|
||||
# INSTEAD: Make name a hard requirement, and see if that solves things
|
||||
@name = "vagrant_#{@type.to_s}_#{@id.split("-").last}"
|
||||
#@name = "vagrant_#{@type.to_s}_#{@id.split("-").last}"
|
||||
@name = nil
|
||||
end
|
||||
end
|
||||
|
||||
@ -157,6 +156,10 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
if !@name
|
||||
errors << I18n.t("vagrant.config.disk.no_name_set", machine: machine.name)
|
||||
end
|
||||
|
||||
errors
|
||||
end
|
||||
|
||||
|
||||
@ -1812,6 +1812,8 @@ en:
|
||||
Disk file '%{file_path}' for disk '%{name}' on machine '%{machine}' does not exist.
|
||||
missing_provider: |-
|
||||
Guest '%{machine}' using provider '%{provider_name}' has provider specific config options for a provider other than '%{provider_name}'. These provider config options will be ignored for this guest
|
||||
no_name_set: |-
|
||||
A 'name' option is required when defining a disk for guest '%{machine}'.
|
||||
common:
|
||||
bad_field: "The following settings shouldn't exist: %{fields}"
|
||||
chef:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user