DEV: Make notify_file_change fallback to `nc` when `socat` missing (#10903)

DEV: Make notify_file_change fallback to nc when socat missing (#10903)

diff --git a/bin/notify_file_change b/bin/notify_file_change
index e408e6e..8680b97 100755
--- a/bin/notify_file_change
+++ b/bin/notify_file_change
@@ -6,7 +6,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../tmp && pwd )"
 SOCKET="$DIR"/file_change.sock
 
 if [[ -e "$SOCKET" ]]; then
-  echo "$1 $2" | socat - UNIX-CONNECT:$SOCKET >/dev/null 2>/dev/null
+  if command -v socat; then
+    echo "$1 $2" | socat - UNIX-CONNECT:$SOCKET >/dev/null 2>/dev/null
+  else
+    echo "$1 $2" | nc -U $SOCKET >/dev/null 2>/dev/null
+  fi
   if [ $? != 0 ]; then
     rm $SOCKET
   fi

GitHub sha: 46d1c91e

This commit appears in #10903 which was approved by eviltrout. It was merged by davidtaylorhq.