]> granicus.if.org Git - esp-idf/commitdiff
windows_install_prerequisites: Fix bug if IDF_PATH is not set
authorAngus Gratton <angus@espressif.com>
Tue, 4 Dec 2018 00:02:49 +0000 (11:02 +1100)
committerAngus Gratton <gus@projectgus.com>
Tue, 4 Dec 2018 00:02:49 +0000 (11:02 +1100)
if IDF_PATH is empty, [ -n ] test passes needs to be [ -n "" ]

Closes https://github.com/espressif/esp-idf/issues/2769

TW27714

tools/windows/windows_install_prerequisites.sh

index 6a236631690ef0bf440bf6816fc334227246dd3b..f75f54eecb93ce02ba7d5931a26ddd9589d40495 100644 (file)
@@ -37,8 +37,8 @@ pacman --noconfirm -S --needed gettext-devel gcc git make ncurses-devel flex bis
        mingw-w64-i686-python2-pip mingw-w64-i686-python2-cryptography unzip winpty
 
 # if IDF_PATH is set, install requirements now as well
-if [ -n $IDF_PATH ]; then
-       python -m pip install -r $IDF_PATH/requirements.txt
+if [ -n "$IDF_PATH" ]; then
+       python -m pip install -r "$IDF_PATH/requirements.txt"
 fi
 
 # Automatically download precompiled toolchain, unpack at /opt/xtensa-esp32-elf/