Enforce a current directory being set for spawned commands

This commit is contained in:
Lukas Wirth 2024-12-29 12:51:13 +01:00
parent 0f95e60da3
commit 5ce14b0439
22 changed files with 99 additions and 75 deletions

View file

@ -7,6 +7,7 @@ fn main() {
println!("cargo::rustc-check-cfg=cfg(rust_analyzer)");
let rustc = env::var("RUSTC").expect("proc-macro-srv's build script expects RUSTC to be set");
#[allow(clippy::disallowed_methods)]
let output = Command::new(rustc).arg("--version").output().expect("rustc --version must run");
let version_string = std::str::from_utf8(&output.stdout[..])
.expect("rustc --version output must be UTF-8")

View file

@ -7,6 +7,8 @@
//! a specific rustup toolchain: this allows testing against older ABIs (e.g.
//! 1.58) and future ABIs (stage1, nightly)
#![allow(clippy::disallowed_methods)]
use std::{
env,
path::{Path, PathBuf},