Skip to content

Commit 5e640bd

Browse files
authored
Merge pull request #910 from herbie-fp/fix-save-session-2
Fixed a bug related to handling invalid job IDs when `--save-session` is enabled
2 parents 64d4e67 + cb5fa2d commit 5e640bd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/web/demo.rkt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626

2727
(define-coercion-match-expander hash-arg/m
2828
(λ (x)
29-
(cond
30-
[(*demo-output*)
31-
(not (directory-exists? (build-path (*demo-output*) x)))]
32-
[else
33-
(let ([m (regexp-match #rx"^([0-9a-f]+)\\.[0-9a-f.]+" x)])
34-
(and m (completed-job? (second m))))]))
29+
(and
30+
(not
31+
(and (*demo-output*) ; If we've already saved to disk, skip this job
32+
(directory-exists? (build-path (*demo-output*) x))))
33+
(let ([m (regexp-match #rx"^([0-9a-f]+)\\.[0-9a-f.]+" x)])
34+
(and m (completed-job? (second m))))))
3535
(λ (x)
3636
(let ([m (regexp-match #rx"^([0-9a-f]+)\\.[0-9a-f.]+" x)])
3737
(get-results-for (if m (second m) x)))))

0 commit comments

Comments
 (0)