From 041738e12848c0e80d45ad4e82656d6090b64e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=B6lder?= Date: Mon, 7 Aug 2023 20:47:47 +0200 Subject: [PATCH] fix: correctly fail when printing disk space (#33) * fix action * du home dir --- entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index f51fc6a..f2e433f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,14 +10,18 @@ if [ "$5" = 'containerize' ] ; then snakemake --directory $1 --snakefile $2 --show-failed-logs $3 --containerize > Dockerfile # return disk space usage on failing if [[ "$?" -ne 0 && "$6" = true ]] ; then - du -h -d3 $1 + du -h -d3 $1 && exit 1 fi elif [ "$5" = 'run' ] ; then # run snakemake with given args snakemake --directory $1 --snakefile $2 --show-failed-logs $3 # return disk space usage on failing if [[ "$?" -ne 0 && "$6" = true ]] ; then - du -h -d3 $1 + df -h + echo "du home\n" + du -h -d3 /github/home + echo "du working directory\n" + du -h -d3 $1 && exit 1 fi else echo "Task input not recognized." && exit 1