Skip to content

Commit

Permalink
fix bug in set args
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Apr 26, 2023
1 parent 589877c commit 787f3fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/bootstrap/bootstrap_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 787f3fe

Please sign in to comment.