From 06056236c057ba28188ab50b966d960e676e651c Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Sat, 25 Apr 2020 04:31:56 -0300 Subject: [PATCH] Fixed build-mo-files not failing the build when msgmerge is not found: https://github.com/ankitects/anki/runs/617116053?check_suite_focus=true#step:27:1244 The build was not falling because when you do `(commands)` in a shell script, the `set -e` directive is not inherited. Then, either do not start a new shell or just use an if to test the error condition. --- qt/po/scripts/build-mo-files | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qt/po/scripts/build-mo-files b/qt/po/scripts/build-mo-files index 9e04f6a34..40fdd34de 100755 --- a/qt/po/scripts/build-mo-files +++ b/qt/po/scripts/build-mo-files @@ -15,7 +15,8 @@ do perl -pe "s%repo/desktop/(.*)/anki.po%$targetDir/\1/LC_MESSAGES%") outfile="$outdir/anki.mo" mkdir -p $outdir - (msgmerge -q "$file" repo/desktop/anki.pot | msgfmt - --output-file="$outfile") || ( - echo "error building $file" - ) + if ! msgmerge -q "$file" repo/desktop/anki.pot | msgfmt - --output-file="$outfile"; then + echo "error building $file"; + exit 1; + fi; done