Allow EnvironmentVariablesObject to be passed an EnvironmentVariables instance

pull/9185/head
Dylan Baker 3 years ago
parent 940fc372db
commit d6a1f85248
  1. 4
      mesonbuild/interpreter/interpreterobjects.py

@ -241,7 +241,9 @@ class EnvironmentVariablesObject(MutableInterpreterObject, MesonInterpreterObjec
'append': self.append_method,
'prepend': self.prepend_method,
})
if isinstance(initial_values, dict):
if isinstance(initial_values, build.EnvironmentVariables):
self.vars = initial_values
elif isinstance(initial_values, dict):
for k, v in initial_values.items():
self.set_method([k, v], {})
elif initial_values is not None:

Loading…
Cancel
Save