Do not to_s the machine id if it is nil
When destroying a machine, the machine id is set to nil, the to_s causes it to be set to empty string. This can cause inconsistent behavior in anything (such as plugins) that tests the machine id.
This commit is contained in:
parent
12c740898c
commit
e530108b6a
|
@ -230,7 +230,7 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
# Store the ID locally
|
# Store the ID locally
|
||||||
@id = value.to_s
|
@id = value.nil? ? nil : value.to_s
|
||||||
|
|
||||||
# Notify the provider that the ID changed in case it needs to do
|
# Notify the provider that the ID changed in case it needs to do
|
||||||
# any accounting from it.
|
# any accounting from it.
|
||||||
|
|
Loading…
Reference in New Issue