Use __finalized variable to determine finalization
This commit is contained in:
parent
70d9fa9faf
commit
a2e0c5619e
@ -26,7 +26,6 @@ module VagrantPlugins
|
||||
super(
|
||||
inputs: [
|
||||
Input.new(type: SDK::FuncSpec::Value) { |arg|
|
||||
logger.info("funcspec for config merge checking against: #{arg.type}")
|
||||
arg.type == "hashicorp.vagrant.sdk.Config.Merge" &&
|
||||
!arg&.value&.value.nil?
|
||||
}
|
||||
|
||||
@ -352,10 +352,11 @@ class Hashicorp::Vagrant::Sdk::Args::ConfigData
|
||||
instance = klass.new
|
||||
d = data.to_ruby
|
||||
|
||||
# Since we are restoring the config, if the data we have
|
||||
# is finalized data, finalize the config before we forcibly
|
||||
# set the instance variables
|
||||
if d.key?("__service_finalized")
|
||||
# Since we are restoring the config, if the config this
|
||||
# represents was already finalized we finalize it first
|
||||
# before we inject the instance variables to get as close
|
||||
# to the correct original state as possible
|
||||
if d.key?("__finalized")
|
||||
instance.finalize!
|
||||
instance._finalize!
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user