diff options
| author | Jeremy Sorensen <jeremy.a.sorensen@gmail.com> | 2017-08-29 21:57:48 -0700 |
|---|---|---|
| committer | Jeremy Sorensen <jeremy.a.sorensen@gmail.com> | 2017-08-29 21:57:48 -0700 |
| commit | 873a05e85c124f34f086d67d6f993aa846a1b4e7 (patch) | |
| tree | 25d7160775864591a1d27da8c463a8256673c9c9 | |
| parent | d24ee2380f0a50748c8e463325b7d03c027de6cb (diff) | |
| download | rust-873a05e85c124f34f086d67d6f993aa846a1b4e7.tar.gz rust-873a05e85c124f34f086d67d6f993aa846a1b4e7.zip | |
allow value of key/value pair argument to set option be boolean
| -rwxr-xr-x | src/bootstrap/configure.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 0e11635c3a0..fa8b7613360 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -247,11 +247,17 @@ def set(key, value): arr = arr[part] for key in known_args: - # The `set` option is special and an be passed a bunch of times + # The `set` option is special and can be passed a bunch of times if key == 'set': for option, value in known_args[key]: keyval = value.split('=', 1) - set(keyval[0], True if len(keyval) == 1 else keyval[1]) + if len(keyval) == 1 or keyval[1] == "true": + value = True + elif keyval[1] == "false": + value = False + else: + value = keyval[1] + set(keyval[0], value) continue # Ensure each option is only passed once |
