]> code.ossystems Code Review - openembedded-core.git/commitdiff
icecc-env: don't raise error when icecc not installed
authorAdam Trhon <adam.trhon@tbs-biometrics.com>
Tue, 19 Feb 2019 09:12:22 +0000 (09:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Feb 2019 22:25:03 +0000 (22:25 +0000)
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh

index 94760076bfa5ac2ee330c4559bac2b84baa0c9e7..990d2fb448adf671ef93fa9078bcb7af176ab021 100644 (file)
@@ -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