From 50c55119123b81bcf2df3d5ee4821903f17d67b3 Mon Sep 17 00:00:00 2001 From: ayakael Date: Fri, 4 May 2018 10:26:20 -0700 Subject: [PATCH] [cmd_deploy] Attempt at deploy_cp bad error handling --- src/cmd_deploy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd_deploy b/src/cmd_deploy index a711d32..c2a65e4 100644 --- a/src/cmd_deploy +++ b/src/cmd_deploy @@ -62,8 +62,9 @@ cmd_deploy() { [[ $? -ne 0 ]] && { _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#updateableidList[@]} ] ${imageid} could not be downloaded from server"; cat ${STDERR}; local ERR=true; continue; } fi deploy_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1 + [[ $? -ne 0 ]] && local CP_ERR=true [[ "${GIT_GET}" == "true" ]] && git -C "${GIT_DIR}" annex drop ${imageid}.flac >/dev/null 2>&1 - [[ $? -ne 0 ]] && { _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#updateableidList[@]} ] Copy of ${imageid} completed with errors"; cat ${STDERR}; local ERR=true; continue; } + [[ "${CP_ERR}" == "true" ]] && { _ansi up 2; echo -en '\033[K'; echo "[ ${COUNT} / ${#updateableidList[@]} ] Copy of ${imageid} completed with errors"; cat ${STDERR}; local ERR=true; continue; } fi