From b6bd2fd8c28d08abbb4418efb914ae8645a11bf9 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Sat, 22 Aug 2020 09:46:01 +0900 Subject: [PATCH] Check the readme file exists --- entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 6e5540e..8803d1a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -25,6 +25,12 @@ fi # Set the default path to README.md README_FILEPATH=${README_FILEPATH:="./README.md"} +# Check the file exists +if [ ! -f ${README_FILEPATH} ]; then + echo "Readme file not found" + exit 1 +fi + # Check the file size if [ $(wc -c <${README_FILEPATH}) -gt 25000 ]; then echo "File size exceeds the maximum allowed 25000 bytes"