From c4c22d72cf43aeb374f1e2c665984bc6eb61b26d Mon Sep 17 00:00:00 2001 From: Salim Date: Thu, 15 Nov 2018 15:36:48 +0100 Subject: [PATCH] Resolved problem with var ostype --- src/file.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file.bash b/src/file.bash index c9c5c83..6a3a615 100644 --- a/src/file.bash +++ b/src/file.bash @@ -284,7 +284,7 @@ assert_symlink_to() { local -r sourcefile="$1" local -r link="$2" # If OS is linux -if [[ "$OSTYPE" == "linux-gnu" ]]; then +if [[ `uname` == "Linux" ]]; then if [ ! -L $link ]; then local -r rem="$BATSLIB_FILE_PATH_REM" local -r add="$BATSLIB_FILE_PATH_ADD" @@ -301,7 +301,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then | fail fi # If OS is OSX -elif [[ "$OSTYPE" == "darwin"* ]]; then +elif [[ `uname` == "Darwin" ]]; then function readlinkf() { TARGET_FILE=$1