From 4dde4dd18d90447d8f12f65a21229a3554582614 Mon Sep 17 00:00:00 2001 From: andrewvious Date: Wed, 7 Aug 2024 15:55:42 -0500 Subject: [PATCH] add support for postpone env variable --- nix-watch.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix-watch.nix b/nix-watch.nix index 6b04ba5..544ccb1 100644 --- a/nix-watch.nix +++ b/nix-watch.nix @@ -228,6 +228,10 @@ let DEBUG=$(convert_int_to_bool $NIX_WATCH_DEBUG) fi + if [[ "$POSTPONE" == false && -n "$NIX_WATCH_POSTPONE" ]]; then + POSTPONE=$(convert_int_to_bool $NIX_WATCH_POSTPONE) + fi + # Temporary file to store the PID of the running command PID_FILE="/tmp/nix-watch/$(basename "$0").pid" debug "PID filepath: ''${ANSI_BLUE}$PID_FILE''${ANSI_RESET}"