You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I change my shell to zsh. When I run export.sh as usual, it promote
IDF_PATH must be set before sourcing this script
but it worked correctly when I used bash.
Solution
I find the code in export.sh(line 24 to 40)
if [[ -z"${IDF_PATH}" ]]
then# If using bash, try to guess IDF_PATH from script locationif [[ -n"${BASH_SOURCE}" ]]
thenif [[ "$OSTYPE"=="darwin"* ]];then
script_dir="$(realpath_int $BASH_SOURCE)"else
script_name="$(readlink -f $BASH_SOURCE)"
script_dir="$(dirname $script_name)"fiexport IDF_PATH="${script_dir}"elseecho"IDF_PATH must be set before sourcing this script"return 1
fifi
it seems it works with bash.
I change it so it can work with zsh
if [[ -z"${IDF_PATH}" ]]
then# If using bash, try to guess IDF_PATH from script locationif [[ -n"${BASH_SOURCE}" ]] || [[ -n"$ZSH_EVAL_CONTEXT" ]]
thenif [[ "$OSTYPE"=="darwin"* ]];then
script_dir="$(realpath_int $BASH_SOURCE)"elseif [[ -n"${BASH_SOURCE}" ]];then
script_name="$(readlink -f $BASH_SOURCE)"else
script_name="$(readlink -f \$0)"fi
script_dir="$(dirname $script_name)"fiexport IDF_PATH="${script_dir}"elseecho"IDF_PATH must be set before sourcing this script"return 1
fifi
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
export.sh cannot run correctly on zsh
export.sh cannot run correctly on zsh (GIT8266O-849)
Apr 1, 2024
Problem
Recently I change my shell to
zsh
. When I runexport.sh
as usual, it promotebut it worked correctly when I used bash.
Solution
I find the code in
export.sh
(line 24 to 40)it seems it works with bash.
I change it so it can work with zsh
The text was updated successfully, but these errors were encountered: