Skip to content

Commit

Permalink
Add path argument to verify-cache-files.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hadka authored and GitHub committed Apr 8, 2020
1 parent 64f8769 commit 2722685
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions __tests__/verify-cache-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ if [ -z "$prefix" ]; then
exit 1
fi

path="$2"
if [ -z "$path" ]; then
echo "Must specify path argument"
exit 1
fi

# Sanity check GITHUB_RUN_ID defined
if [ -z "$GITHUB_RUN_ID" ]; then
echo "GITHUB_RUN_ID not defined"
exit 1
fi

# Verify file exists
file="test-cache/test-file.txt"
file="$path/test-file.txt"
echo "Checking for $file"
if [ ! -e $file ]; then
echo "File does not exist"
Expand All @@ -27,4 +33,4 @@ echo "File content:\n$content"
if [ -z "$(echo $content | grep --fixed-strings "$prefix $GITHUB_RUN_ID")" ]; then
echo "Unexpected file content"
exit 1
fi
fi

0 comments on commit 2722685

Please sign in to comment.