From 32d8636ae1d8e754c3d8d9ada35ed54f2cbb71d2 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 3 Feb 2021 12:27:23 +0100 Subject: [PATCH] timetable: prevent empty time lines --- garlic/pp/timetable.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/garlic/pp/timetable.nix b/garlic/pp/timetable.nix index 586d407..0f2e18b 100644 --- a/garlic/pp/timetable.nix +++ b/garlic/pp/timetable.nix @@ -20,11 +20,14 @@ stdenv.mkDerivation { conf=garlic_config.json for run in $(ls -d [0-9]* | sort -n); do time=$(awk '/^ ?time /{print $2}' $run/stdout.log) + if [ -z "$time" ]; then + echo "error: cannot match \"time\" line + echo "check stdout log file: ${inputResult}/$exp/$unit/$run/stdout.log" + exit 1 + fi jq -cn "{ exp:\"$exp\", unit:\"$unit\", config:inputs, time:$time, run:$run }" $conf >> $out done done done - - #gzip $out ''; }