Skip to content

Commit

Permalink
fix: correctly fail when printing disk space (#33)
Browse files Browse the repository at this point in the history
* fix action

* du home dir
  • Loading branch information
FelixMoelder authored Aug 7, 2023
1 parent 3a68a3b commit 041738e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 041738e

Please sign in to comment.