mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
export.fish: Remove source check
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
This commit is contained in:
parent
77b03ff800
commit
9a79de3659
@ -1,15 +1,6 @@
|
|||||||
# This script should be sourced, not executed.
|
# This script should be sourced, not executed.
|
||||||
|
|
||||||
function idf_export_main
|
function idf_export_main
|
||||||
# The file doesn't have executable permissions, so this shouldn't really happen.
|
|
||||||
# Doing this in case someone tries to chmod +x it and execute...
|
|
||||||
set cmd (status current-command)
|
|
||||||
if test $cmd != source -a $cmd != .
|
|
||||||
echo "his script should be sourced, not executed:"
|
|
||||||
echo . (realpath (status --current-filename)/..)
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if not set -q IDF_PATH
|
if not set -q IDF_PATH
|
||||||
echo "IDF_PATH must be set before sourcing this script"
|
echo "IDF_PATH must be set before sourcing this script"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user