---
 texmf-dist/scripts/texlive/fmtutil.sh |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- texlive-base-jessie.git.orig/texmf-dist/scripts/texlive/fmtutil.sh
+++ texlive-base-jessie.git/texmf-dist/scripts/texlive/fmtutil.sh
@@ -4,6 +4,9 @@
 # Public domain.  Originally written by Thomas Esser.
 # Run with --help for usage.
 
+set -e
+retval=0
+
 # program history:
 #   further changes in texk/texlive/tl_scripts/ChangeLog.
 #   2007-01-04  patch by JK to support $engine subdir (enabled by default)
@@ -533,8 +536,8 @@
   if test -n "$cfgmaint"; then
     if test -z "$cfgparam"; then
       setupTmpDir
-      co=`tcfmgr --tmp $tmpdir --cmd co --file $cnf`
-      test $? = 0 || cleanup 1
+      co=`tcfmgr --tmp $tmpdir --cmd co --file $cnf || retval=$?`
+      test $retval = 0 || cleanup 1
       set x $co; shift
       id=$1; cnf_file=$3; orig=$4
       verboseMsg "$progname: initial config file is \`$orig'"
