Skip to content

Commit dbd281c

Browse files
committed
prevent that lscpu|grep causes the script to fail
1 parent 6084589 commit dbd281c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ lscpu > _bot_job${SLURM_JOB_ID}.lscpu
176176
cat /etc/os-release > _bot_job${SLURM_JOB_ID}.os
177177

178178
# Also: fetch CPU flags into an array, so that we can implement a hard check against a reference
179-
lscpu_flags_line=$(lscpu | grep "Flags:")
179+
lscpu_flags_line=$(lscpu | grep "Flags:" || echo "")
180180
# strip leading "Flags:" and spaces, and put result in a bash array
181181
if [[ $lscpu_flags =~ Flags:\ (.*) ]]; then lscpu_flags=(${BASH_REMATCH[1]}); fi
182182
# for now, just print

0 commit comments

Comments
 (0)