Implement "conditional ignoring of changes"
Author: e2Created Apr 30, 2016Updated Aug 13, 2020
Labels✨ Feature
Sometimes there are situations where responding to changes doesn't make sense, e.g. while switching git branches.
In this case, we still want to monitor changes (instead of pausing), but we don't want to run any Guard plugins. E.g. we don't want to run any changes unless the branch is 'master'.
Implementation: not sure.
Alternative 1: wrapping every watch block to return nil if a given condition evaluates to true.
Alternative 2: wrapping everything in a group with halt_on_fail and having the first task "fail" if a condition is true.
Alternative 3: monkey-patching Guard to not run tasks when a condition is true
Source: guard/guard