Skip to content

Disable with DISABLE_SPRING_WATCHER_LISTEN env var #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ On larger projects this means spring will be more responsive, more accurate and
Listen 2.7 and higher and 3.0 are supported.
If you rely on Listen 1 you can use v1.0.0 of this gem.

## Environment variables

* `DISABLE_SPRING_WATCHER_LISTEN` - If set, this disables the loading of this gem. This can be useful for projects where
some configurations do not support inotify (e.g. Docker on M1 Macs).

## Installation

Stop Spring if it's already running:
Expand Down
2 changes: 2 additions & 0 deletions lib/spring/watcher/listen.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
return if ENV['DISABLE_SPRING_WATCHER_LISTEN']

require "spring/watcher"
require "spring/watcher/abstract"

Expand Down