mirror of
https://github.com/janet-lang/janet
synced 2024-12-11 01:10:25 +00:00
Exit early when filewatch is not supported.
Currently we have no poll implementation.
This commit is contained in:
parent
c0e508e334
commit
9e334da2d6
@ -27,6 +27,12 @@
|
||||
(def is-win (or (= :mingw (os/which)) (= :windows (os/which))))
|
||||
(def is-linux (= :linux (os/which)))
|
||||
|
||||
# If not supported, exit early
|
||||
(def [supported msg] (protect (filewatch/new chan)))
|
||||
(when (and (not supported) (string/find "filewatch not supported" msg))
|
||||
(end-suite)
|
||||
(quit))
|
||||
|
||||
# Test GC
|
||||
(assert-no-error "filewatch/new" (filewatch/new chan))
|
||||
(gccollect)
|
||||
|
Loading…
Reference in New Issue
Block a user