Skip to content

Commit 229ff1e

Browse files
authored
Merge pull request #28 from f1sherman/env-var-to-disable
Disable with `DISABLE_SPRING_WATCHER_LISTEN` env var
2 parents e0a3bd5 + 3459158 commit 229ff1e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ On larger projects this means spring will be more responsive, more accurate and
1414
Listen 2.7 and higher and 3.0 are supported.
1515
If you rely on Listen 1 you can use v1.0.0 of this gem.
1616

17+
## Environment variables
18+
19+
* `DISABLE_SPRING_WATCHER_LISTEN` - If set, this disables the loading of this gem. This can be useful for projects where
20+
some configurations do not support inotify (e.g. Docker on M1 Macs).
21+
1722
## Installation
1823

1924
Stop Spring if it's already running:

lib/spring/watcher/listen.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
return if ENV['DISABLE_SPRING_WATCHER_LISTEN']
2+
13
require "spring/watcher"
24
require "spring/watcher/abstract"
35

0 commit comments

Comments
 (0)