Skip to content

Commit 4b27ebe

Browse files
Update ci/scripts/utils/ci_utils.sh
better regex for testing for a substring (pervasively missed) Co-authored-by: Walter Kolczynski - NOAA <Walter.Kolczynski@noaa.gov>
1 parent b1e2b13 commit 4b27ebe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/scripts/utils/ci_utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function cancel_slurm_jobs() {
1515

1616
for job_id in ${job_ids}; do
1717
job_name=$(sacct -j "${job_id}" --format=JobName%100 | head -3 | tail -1 | sed -r 's/\s+//g') || true
18-
if [[ "${job_name}" == *"${substring}"* ]]; then
18+
if [[ "${job_name}" =~ ${substring} ]]; then
1919
echo "Canceling Slurm Job ${job_name} with: scancel ${job_id}"
2020
scancel "${job_id}"
2121
continue

0 commit comments

Comments
 (0)