From: Adam Trhon Date: Tue, 12 Feb 2019 12:14:58 +0000 (+0000) Subject: icecc-env: don't raise error when icecc not installed X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~15359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27a8c14039970105238b66b9f3025435cb7e8a58;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh index 81b3018bb6d..0dccc41c8ae 100644 --- a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh +++ b/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