about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEdgar Luque <git@edgarluque.com>2023-07-12 11:49:00 +0200
committerEdgar Luque <git@edgarluque.com>2023-07-12 11:52:53 +0200
commitd68eea61c3e3d249602d66d28e8f6dbd76e7c30f (patch)
tree54a11785c8cefbed242d6da0616396fd13d10498
parent910be1b3e83d8876a144441695b7a5077967296e (diff)
downloadrust-d68eea61c3e3d249602d66d28e8f6dbd76e7c30f.tar.gz
rust-d68eea61c3e3d249602d66d28e8f6dbd76e7c30f.zip
Fix bootstrap.py uname error.
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
-rw-r--r--src/bootstrap/bootstrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 149350e62a0..e5a710c0a96 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -256,7 +256,7 @@ def default_build_triple(verbose):
     if uname is None:
         return 'x86_64-pc-windows-msvc'
 
-    kernel, cputype, processor = uname.decode(default_encoding).split()
+    kernel, cputype, processor = uname.decode(default_encoding).split(maxsplit=2)
 
     # The goal here is to come up with the same triple as LLVM would,
     # at least for the subset of platforms we're willing to target.