Skip to content

Commit 3e21b25

Browse files
Rollup merge of #81519 - jyn514:rustup-toolchain, r=Mark-Simulacrum
Don't print error output from rustup when detecting default build triple Before, it could print this error if no toolchain was configured: ``` error: no default toolchain configured error: backtrace: error: stack backtrace: 0: error_chain::backtrace::imp::InternalBacktrace::new 1: rustup::config::Cfg::toolchain_for_dir 2: rustup_init::run_rustup_inner 3: rustup_init::main 4: std::rt::lang_start::{{closure}} 5: main 6: __libc_start_main 7: _start ```
2 parents 9cb43cf + 807b5f5 commit 3e21b25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bootstrap/bootstrap.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ def default_build_triple(verbose):
194194
# being detected as GNU instead of MSVC.
195195
default_encoding = sys.getdefaultencoding()
196196
try:
197-
version = subprocess.check_output(["rustc", "--version", "--verbose"])
197+
version = subprocess.check_output(["rustc", "--version", "--verbose"],
198+
stderr=subprocess.DEVNULL)
198199
version = version.decode(default_encoding)
199200
host = next(x for x in version.split('\n') if x.startswith("host: "))
200201
triple = host.split("host: ")[1]

0 commit comments

Comments
 (0)