kopia lustrzana https://github.com/espressif/esp-idf
export: avoid error on unbound variable
I the shell has `set -u` (to abort on unbound variable), sourcing
export.sh currently fails when IDF_EXPORT_QUIET or IDF_PATH is not set:
> /path/to/esp-idf/export.sh:16: IDF_EXPORT_QUIET: unbound variable
This commit sets a default empty value to those variable, as done
in 16731833fb
(which forgot IDF_PATH as it's usually set, the other
variable landed later in the file).
pull/11147/head
rodzic
7cfc1a747f
commit
2a3cdb090f
|
@ -13,7 +13,7 @@ __realpath() {
|
||||||
|
|
||||||
|
|
||||||
__verbose() {
|
__verbose() {
|
||||||
[ -n "${IDF_EXPORT_QUIET}" ] && return
|
[ -n "${IDF_EXPORT_QUIET-}" ] && return
|
||||||
echo "$@"
|
echo "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ __main() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${IDF_PATH}" ]
|
if [ -z "${IDF_PATH-}" ]
|
||||||
then
|
then
|
||||||
# IDF_PATH not set in the environment.
|
# IDF_PATH not set in the environment.
|
||||||
# If using bash or zsh, try to guess IDF_PATH from script location.
|
# If using bash or zsh, try to guess IDF_PATH from script location.
|
||||||
|
|
Ładowanie…
Reference in New Issue