From d6a1f85248e80650d628d969212a06992d1b8f4c Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 18 Aug 2021 11:14:10 -0700 Subject: [PATCH] Allow EnvironmentVariablesObject to be passed an EnvironmentVariables instance --- mesonbuild/interpreter/interpreterobjects.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index d524059e7..c614f0979 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/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: