[cmd_export] Fixed bug where git annex get failure would not be caught

This commit is contained in:
ayakael 2019-02-10 11:36:36 -05:00
parent 0e9c733b50
commit a731a3a8b7
No known key found for this signature in database
GPG key ID: DF4ED0DE242BD38A

View file

@ -66,8 +66,9 @@ cmd_export() {
local GIT_GET=false
if [[ ! -f "${GIT_DIR}/${imageid}.flac" ]]; then
git -C "${GIT_DIR}" annex get "${imageid}.flac" >${STDERR} 2>&1
local ERROR=$?
local GIT_GET=true
[[ $? -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; }
[[ $ERROR -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
export_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1
[[ $? -ne 0 ]] && local CP_ERR=true