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