Skip to content

Commit ac72cd3

Browse files
authored
Merge pull request #130 from bedroge/lscpu_empty_flags_fix
Prevent that `lscpu | grep Flags` fails on systems that don't report any flags
2 parents 6084589 + dbd281c commit ac72cd3

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)