diff --git a/lib/functionLibrary.sh b/lib/functionLibrary.sh index dffaaa17f..961c0e679 100644 --- a/lib/functionLibrary.sh +++ b/lib/functionLibrary.sh @@ -61,7 +61,7 @@ function checkFileSha() { return 1 fi - if [[ ! -x $2 ]]; then + if [[ ! -x "${2}" ]]; then info "The file we're trying to check does not exist: ${2}" return 1 fi diff --git a/lib/tests/functionLibraryTests.sh b/lib/tests/functionLibraryTests.sh index 7c3fbbb89..ba3c4588f 100644 --- a/lib/tests/functionLibraryTests.sh +++ b/lib/tests/functionLibraryTests.sh @@ -57,10 +57,10 @@ function infoTests(){ # checkFileSha function checkFileShaTests(){ # Does it work when it should? + info "enable" "logging" checkFileSha "${sampleFileSha}" "${scriptDir}/${sampleFileName}" testResults "checkFileShaTest 1" "$?" echo "D1: $(ls ${scriptDir})" - info "enable" "logging" echo "checkFileSha ${sampleFileSha} ${scriptDir}/${sampleFileName}" info "disable" "logging"