From 787f3fea15978b15738d9047b240841aa2d7b5ce Mon Sep 17 00:00:00 2001 From: yukang Date: Thu, 27 Apr 2023 00:32:01 +0800 Subject: [PATCH] fix bug in set args --- src/bootstrap/bootstrap_test.py | 2 ++ src/bootstrap/configure.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/bootstrap_test.py b/src/bootstrap/bootstrap_test.py index 1e46348577d77..5ecda83ee66b1 100644 --- a/src/bootstrap/bootstrap_test.py +++ b/src/bootstrap/bootstrap_test.py @@ -117,6 +117,8 @@ def test_set_codegen_backends(self): self.assertNotEqual(build.config_toml.find("codegen-backends = ['cranelift']"), -1) build = self.serialize_and_parse(["--set", "rust.codegen-backends=cranelift,llvm"]) self.assertNotEqual(build.config_toml.find("codegen-backends = ['cranelift', 'llvm']"), -1) + build = self.serialize_and_parse(["--enable-full-tools"]) + self.assertNotEqual(build.config_toml.find("codegen-backends = ['llvm']"), -1) if __name__ == '__main__': SUITE = unittest.TestSuite() diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index c1ea9dd0ce338..571062a3a6fd0 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -299,7 +299,7 @@ def set(key, value, config): parts = key.split('.') for i, part in enumerate(parts): if i == len(parts) - 1: - if is_value_list(part): + if is_value_list(part) and isinstance(value, str): value = value.split(',') arr[part] = value else: