Skip to content

Commit 8812807

Browse files
committed
Warn about missing fswatch
1 parent d4040fb commit 8812807

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

commands/setup

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,18 @@ fi
146146

147147
# Watch ------------------------------------------------------------------------
148148

149-
export WATCH_CMD=(fswatch --one-per-batch --recursive)
149+
export WATCH_CMD=(watch --one-per-batch --recursive)
150150

151151
if [[ "$OSTYPE" =~ ^(linux-gnu|msys|cygwin)$ ]]; then
152152
# The default monitor notifies on read accesses...
153153
WATCH_CMD+=(--monitor poll_monitor '--latency=5')
154154
fi
155155

156156
WATCH_CMD+=(../*)
157+
158+
watch() {
159+
if ! command -v fswatch > /dev/null; then
160+
>&2 echo "WARNING: Could not find fswatch ( http://emcrisostomo.github.io/fswatch/ )."
161+
fi
162+
fswatch "$@"
163+
}

0 commit comments

Comments
 (0)