Closed dyroberts closed 6 years ago
Looks like the "simplest" fix for this is:
--- 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=""
There is a check to see if the file exists before setting "TEXT_FILE_CONTENT", but later checks are just if the value is set, not if it exists.
In my testing, this addresses both example jobs provided.
Merged in #47
steps to reproduce:
expected: each job produces a slack notification in the specified channel actual: no notifications are produced