Skip to content

Commit

Permalink
fix for sha issue
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley committed Dec 17, 2024
1 parent 901aa93 commit 3a742dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions lib/functionLibrary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ function checkFileSha() {
return 1
fi

if [[ ! -x "${2}" ]]; then
if [[ ! `ls "${2}" &> /dev/null` ]]; then
info "The file we're trying to check does not exist: ${2}"
scriptLocation="${2}"
echo "D2: $(ls ${scriptLocation%/*})"
return 1
fi

Expand Down
4 changes: 0 additions & 4 deletions lib/tests/functionLibraryTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ 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})"
echo "checkFileSha ${sampleFileSha} ${scriptDir}/${sampleFileName}"
info "disable" "logging"

# Does it fail when we have the wrong sha?
checkFileSha "12345" "${scriptDir}/${sampleFileName}" &> /dev/null
Expand Down

0 comments on commit 3a742dc

Please sign in to comment.