diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh index eba8c30..ca9be57 100644 --- a/Dh_Haskell.sh +++ b/Dh_Haskell.sh @@ -419,8 +419,11 @@ haddock_recipe(){ # local PS5=$PS4; PS4=" + haddock_recipe> "; set -x hc=`packages_hc` haddock=`hc_haddock ${hc}` - [ ! -x /usr/bin/${haddock} ] || run ${DEB_SETUP_BIN_NAME} haddock --builddir=dist-${hc} --with-haddock=/usr/bin/${haddock} --with-ghc=${hc} ${DEB_HADDOCK_OPTS} || \ - echo "Haddock failed (no modules?), creating empty documentation package." + if [ -x /usr/bin/${haddock} ] && \ + ! run ${DEB_SETUP_BIN_NAME} haddock --builddir=dist-${hc} --with-haddock=/usr/bin/${haddock} --with-ghc=${hc} ${DEB_HADDOCK_OPTS} ; then + echo "Haddock failed (no modules?), refusing to create empty documentation package." + exit 1 + fi # PS4=$PS5 }