Skip to content

Commit 3948f84

Browse files
committed
fix: handle timeout=0 edge case and case-insensitive skip matching
- Treat timeout <= 0 as invalid (fall back to 120s default) since timeout=0 would cause the watcher to exit immediately with no work. - Lowercase NEMOCLAW_SKIP_AUTO_PAIR before matching so True, YES, tRuE etc. all work as expected.
1 parent 8080c27 commit 3948f84

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎scripts/nemoclaw-start.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ PYTOKEN
112112

113113
# Launch a background watcher that auto-approves pending device-pair requests.
114114
start_auto_pair() {
115-
case "${NEMOCLAW_SKIP_AUTO_PAIR:-}" in
116-
1|true|yes|TRUE|YES)
115+
case "$(echo "${NEMOCLAW_SKIP_AUTO_PAIR:-}" | tr '[:upper:]' '[:lower:]')" in
116+
1|true|yes)
117117
echo "[gateway] auto-pair watcher skipped (NEMOCLAW_SKIP_AUTO_PAIR is set)"
118118
return
119119
;;
@@ -126,7 +126,7 @@ import time
126126
127127
try:
128128
timeout = int(os.environ.get('NEMOCLAW_AUTO_PAIR_TIMEOUT', '120'))
129-
if timeout < 0:
129+
if timeout <= 0:
130130
timeout = 120
131131
except ValueError:
132132
timeout = 120

0 commit comments

Comments
 (0)