From fb6fcaeb06a6a3dd4ccbf3684e2868839523b954 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Fri, 15 Sep 2017 08:10:17 +0200 Subject: [PATCH] Fixed test case where the bash_it.sh would fail with a non-zero return value This was caused by the way the check for installed preview apps was handled. --- bash_it.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bash_it.sh b/bash_it.sh index ab848974..504e26b0 100755 --- a/bash_it.sh +++ b/bash_it.sh @@ -91,9 +91,13 @@ fi # Adding Support for other OSes PREVIEW="less" -[ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview" -# shellcheck disable=SC2034 -[ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app" + +if [ -s /usr/bin/gloobus-preview ]; then + PREVIEW="gloobus-preview" +elif [ -s /Applications/Preview.app ]; then + # shellcheck disable=SC2034 + PREVIEW="/Applications/Preview.app" +fi # Load all the Jekyll stuff