mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-01-08 06:53:05 -06:00
Add a validator to prevent conflicting clock configs
This is a second layer of protection, to make the behavior minimally surprising for the user. The implementation of clock_* handlers follows a precedence decision order in case of conflict, but that shouldn't be relied on as the only layer of defense against bad configs.
This commit is contained in:
parent
78e46979e0
commit
2213314a5c
@ -1249,6 +1249,10 @@ module VagrantPlugins
|
||||
end
|
||||
end
|
||||
|
||||
if [@clock_absolute, @clock_adjustment, @clock_timezone].count {|clock| !clock.nil?} > 1
|
||||
errors << "At most, only one of [clock_absolute, clock_adjustment, clock_timezone] may be set."
|
||||
end
|
||||
|
||||
errors = validate_sysinfo(machine, errors)
|
||||
|
||||
{ 'Libvirt Provider' => errors }
|
||||
|
Loading…
Reference in New Issue
Block a user