From 0afb64209232f8ca4b6991b695e1fb8545da3d69 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Tue, 20 Sep 2022 14:54:31 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Document=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + src/rust_toolchain.rs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d5d3de5..235ba2a 100644 --- a/README.md +++ b/README.md @@ -109,4 +109,5 @@ raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/.espressif\\python_env\\idf4.4_py3.11_env\\Scripts\\python.exe', '-m', 'pip', 'install', '--no-warn-script-location', '-r', /.espressif\\esp-idf-ae062fbba3ded0aa\\release-v4.4\\requirements.txt', '--extra-index-url', 'https://dl.espressif.com/pypi']' returned non-zero exit status 1. Error: Could not install esp-idf ``` + - Windows Xtensa Rust installation is not working properly. diff --git a/src/rust_toolchain.rs b/src/rust_toolchain.rs index 3d9aaf4..3d16f5d 100644 --- a/src/rust_toolchain.rs +++ b/src/rust_toolchain.rs @@ -145,10 +145,14 @@ impl RustToolchain { .rustup_home .clone() .unwrap_or_else(get_default_rustup_home); + #[cfg(unix)] + let default_toolchain_destination = rustup_home.join("toolchains").join("esp"); + #[cfg(windows)] + let default_toolchain_destination = rustup_home.join("toolchains"); let toolchain_destination = args .toolchain_destination .clone() - .unwrap_or_else(|| rustup_home.join("toolchains").join("esp")); + .unwrap_or(default_toolchain_destination); Self { dist_file, dist_url,