Esptool.py is available from the esptool package which is installed in
every ESP-IDF v5.0+ shells. Therefore, the path to the legacy wrapper
scripts is not needed to be in the PATH. In some cases like
https://github.com/espressif/esp-idf/issues/10926 it even cases problem
because the wrapper doesn't have a shebang line and is not executable.
Note that the wrapper is kept only for invoking esptool as "python
$IDF_PATH/..../esptool.py" which was previously used mostly in CMake
files. There should be no other use-case where the esptool wrappers are
still needed.
The export.fish script exits with an exit code of 4. Thus, any shell checks that make sure the source command exits successfully always failed. This was due to the last line trying to erase the __main function. In fish, you can't erase a function using the `set` command, you can only erase variables. By removing that line the script now exits with an exit code of 0 instead of 4.
Erase __main function at the end of export.fish
Closes https://github.com/espressif/esp-idf/pull/10828
In the latest release of macOS (and probable some other recent *nixes as well?) `python` is no longer available by default, only `python3`. This causes `export.sh` to fail as it still had a reference to plain `python`. This now works as expected.
Merges https://github.com/espressif/esp-idf/pull/9749
Edited GitHub user's change to keep the echo message consistent with other export scripts
Fixed working with environmental variables in fish.
pull request sha: 5a646b8067
This prevents starting a new shell with the IDF environment like this:
env IDF_PATH=/my/idf/path fish -C 'source "$IDF_PATH"/export.fish'
as `status current-command` returns `fish` in this case, but this check expects
`source`.
This check does nothing anyway, as you can't even execute that file even if it
was marked executable, as fish rejects files without a shebang, and it's not
valid bash.
Closes https://github.com/espressif/esp-idf/pull/5860