From 5e3c1c2b5f63e57f98a7d02f75a559d225341b1c Mon Sep 17 00:00:00 2001 From: Pascal Hertleif Date: Wed, 13 Nov 2019 20:44:39 +0100 Subject: Allow usage of CARGO_TARGET_DIR env var --- xtask/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 576ba003a..84842b428 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -227,7 +227,8 @@ fn install_client(ClientOpt::VsCode: ClientOpt) -> Result<()> { } fn install_server(opts: ServerOpt) -> Result<()> { - let ac = autocfg::AutoCfg::with_dir("target")?; + let target_dir = env::var_os("CARGO_TARGET_DIR").unwrap_or_else(|| "target".into()); + let ac = autocfg::AutoCfg::with_dir(target_dir)?; let old_rust = !ac.probe_rustc_version(REQUIRED_RUST_VERSION.0, REQUIRED_RUST_VERSION.1); -- cgit v1.2.3