diff options
| author | yukang <moorekang@gmail.com> | 2023-04-27 00:32:01 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2023-04-27 00:32:01 +0800 |
| commit | 787f3fea15978b15738d9047b240841aa2d7b5ce (patch) | |
| tree | b4997e8675542e1008126cbfeda6daa56abadbdd | |
| parent | 589877cef1f859dd1a10d6e0cf84d5dc7659c79d (diff) | |
| download | rust-787f3fea15978b15738d9047b240841aa2d7b5ce.tar.gz rust-787f3fea15978b15738d9047b240841aa2d7b5ce.zip | |
fix bug in set args
| -rw-r--r-- | src/bootstrap/bootstrap_test.py | 2 | ||||
| -rwxr-xr-x | src/bootstrap/configure.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap_test.py b/src/bootstrap/bootstrap_test.py index 1e46348577d..5ecda83ee66 100644 --- a/src/bootstrap/bootstrap_test.py +++ b/src/bootstrap/bootstrap_test.py @@ -117,6 +117,8 @@ class GenerateAndParseConfig(unittest.TestCase): 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 c1ea9dd0ce3..571062a3a6f 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: |
