[cmd_export] Fixed bug where git annex get failure would not be caught
This commit is contained in:
parent
0e9c733b50
commit
a731a3a8b7
1 changed files with 2 additions and 1 deletions
|
@ -66,8 +66,9 @@ cmd_export() {
|
||||||
local GIT_GET=false
|
local GIT_GET=false
|
||||||
if [[ ! -f "${GIT_DIR}/${imageid}.flac" ]]; then
|
if [[ ! -f "${GIT_DIR}/${imageid}.flac" ]]; then
|
||||||
git -C "${GIT_DIR}" annex get "${imageid}.flac" >${STDERR} 2>&1
|
git -C "${GIT_DIR}" annex get "${imageid}.flac" >${STDERR} 2>&1
|
||||||
|
local ERROR=$?
|
||||||
local GIT_GET=true
|
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
|
fi
|
||||||
export_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1
|
export_cp "${GIT_DIR}" "${TARGET}" "${DB_FILE}" ${imageid} > ${STDERR} 2>&1
|
||||||
[[ $? -ne 0 ]] && local CP_ERR=true
|
[[ $? -ne 0 ]] && local CP_ERR=true
|
||||||
|
|
Loading…
Reference in a new issue