瀏覽代碼

icecc-env: don't raise error when icecc not installed

When icecc is not installed, the `which icecc` command in icecc-env.sh
returns nonzero. This happens when environment is being sourced. When
the terminal has `set -e`, the whole script fails and terminal is
closed.

Fix this by ignoring errors from the which command.

Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Adam Trhon 5 年之前
父節點
當前提交
27a8c14039
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh

+ 1 - 1
meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh

@@ -21,7 +21,7 @@
 #
 
 if [ -z "$ICECC_PATH" ]; then
-    ICECC_PATH=$(which icecc 2> /dev/null)
+    ICECC_PATH=$(which icecc 2> /dev/null || true)
 fi
 
 if [ -n "$ICECC_PATH" ]; then