Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export.fish: set IDF_PATH without changing current working directory (IDFGH-8140) #9637

Merged
merged 1 commit into from
Sep 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions export.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ function unset
end

function __main
set script_dir (dirname (readlink -m (status -f)))

if not set -q IDF_PATH
set -gx IDF_PATH (cd (dirname (status -f)); and pwd)
set -gx IDF_PATH $script_dir
echo "Setting IDF_PATH to '$IDF_PATH'"
end

set script_dir (cd (dirname (status -f)); and pwd)
if test "$script_dir" = "."
set script_dir $pwd
end
if test "$IDF_PATH" != "$script_dir"
# Change IDF_PATH is important when there are 2 ESP-IDF versions in different directories.
# Sourcing this script without change, would cause sourcing wrong export script.
Expand Down