Abort if we're configured to use Musicbrainz and the script fails
authorSteve McIntyre <steve@einval.com>
Mon, 26 Feb 2018 19:15:06 +0000 (19:15 +0000)
committerSteve McIntyre <steve@einval.com>
Mon, 26 Feb 2018 19:15:06 +0000 (19:15 +0000)
abcde

diff --git a/abcde b/abcde
index 0fba0f2..eebc1df 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -2600,12 +2600,10 @@ do_musicbrainz_read ()
                local SOURCE_WORKDIR="${ABCDETEMPDIR}/data-musicbrainz"
                mkdir -p "${SOURCE_WORKDIR}"
                ${MUSICBRAINZ} --command data --discid "${MBDISCID}" --workdir "${SOURCE_WORKDIR}" --start ${NUM_CDDB_MATCHES}
-               # To have got this far, must have been able to run
-               # $MUSICBRAINZ earlier to calculate the ID. Errors here are
-               # non-fatal, maybe a lookup failure? Log and continue.
                error=$?
                if [ $error != 0 ]; then
-                       log error "$MUSICBRAINZ failed to run"
+                       log error "$MUSICBRAINZ failed to run; ABORT"
+                       exit $error
                fi
 
                # Check for no matches.