Closed marsfan closed 9 months ago
I see, it looks like the std::env::var
mixes both user and system PATH
environment variable. I did some testing and the following seems to fix the issue, could you test and verify that the issue is solved:
cargo uninstall espup
cargo install espup --git https://github.com/SergioGasquez/espup --branch fix/windows-path
You may need to remove the duplicated entries from system in your user env path
@SergioGasquez That seems to have fixed it.
Thanks for testing the issue! I will probably cut a release before the next Xtensa Rust release
Awesome. I'll have to give it a go then. I've been having a few different issues with getting the ESP32 working with Windows that lead to a lot of uninstalls and re-installs. Having the tool fix the path automatically will help me with that.
@SergioGasquez This is a bit off-topic, but you mentioned "Before the next Xtensa Rust release" Do you have a recommendation on the best way to keep track of when those happen, so I know when I need to run espup
to get the new version of the toolchain?
@SergioGasquez This is a bit off-topic, but you mentioned "Before the next Xtensa Rust release" Do you have a recommendation on the best way to keep track of when those happen, so I know when I need to run
espup
to get the new version of the toolchain?
Usually, the schedule is very similar to the stable channel (see https://forge.rust-lang.org/#current-release-versions for dates), but we may have some delay since we sometimes give a few days before marking the release as latest
on gh. Releases are published in https://github.com/esp-rs/rust-build/releases so you can enable notifications for it or just join the matrix channel (https://matrix.to/#/#esp-rs:matrix.org) where we notify when the new version is published.
Awesome. I enabled release notifications. Thanks
Bug description
When using
espup
on Windows, the tool messes up user PATH environment variable in two ways.To help clear things up, the following is a bare-bones example of what I am seeing.
Before running
espup
I have the following configurationUser PATH varriable
System PATH variable
After running, the system PATH environment variable remains unchanged, but the user PATH environment variable is as follows:
As you can see, the system PATH members are prepended to the PATH members, and then the user PATH members are duplicated.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only the additional paths are added to the user PATH environment variable necessary for compiling Rust programs for the ESP32 have been added.
Screenshots
Environment
Additional context