From 47b17d368aedae2ead388be02415aca653f340db Mon Sep 17 00:00:00 2001 From: Matt Hope Date: Wed, 28 Feb 2018 10:51:11 +1100 Subject: [PATCH] Handle the case where "text_file" may be set, but the target file may be empty or missing. --- out | 1 + 1 file changed, 1 insertion(+) diff --git a/out b/out index 0d6504b..e36f029 100755 --- a/out +++ b/out @@ -53,6 +53,7 @@ then fi export TEXT_FILE_CONTENT="" +[[ -n "${text_file}" && ! -f "${text_file}" ]] && text_file="" [[ -n "${text_file}" && -f "${text_file}" ]] && TEXT_FILE_CONTENT="$(cat "${text_file}")" ATTACHMENTS_FILE_CONTENT=""