mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-30 23:23:07 +00:00 
			
		
		
		
	Exit early when filewatch is not supported.
Currently we have no poll implementation.
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose