mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
mach: fix error on Python 3 when specifying a target
Previously, when running Mach on Python 3, specifying a target when building causes this error: ``` TypeError: a bytes-like object is required, not 'str' File "/servo/python/servo/build_commands.py", line 241, in build self.ensure_bootstrapped(target=target) File "/servo/python/servo/command_base.py", line 1023, in ensure_bootstrapped ["rustup", "target", "list", "--installed", "--toolchain", toolchain] ``` This change encodes the target using utf-8 before comparing. Fixes #25614.
This commit is contained in:
parent
7596a0fc1a
commit
aff14a77e7
1 changed files with 1 additions and 1 deletions
|
@ -1019,7 +1019,7 @@ install them, let us know by filing a bug!")
|
|||
if component.encode("utf-8") not in installed:
|
||||
check_call(["rustup", "component", "add", "--toolchain", toolchain, component])
|
||||
|
||||
if target and "uwp" not in target and target not in check_output(
|
||||
if target and "uwp" not in target and target.encode("utf-8") not in check_output(
|
||||
["rustup", "target", "list", "--installed", "--toolchain", toolchain]
|
||||
):
|
||||
check_call(["rustup", "target", "add", "--toolchain", toolchain, target])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue