From 14524f7e491effdba6851e05cfa42a98159a9daf Mon Sep 17 00:00:00 2001 From: garrytan Date: Tue, 3 Nov 2026 07:59:38 +0000 Subject: [PATCH] fix: a touch whose identity read comes back empty keeps the recorded identity and its runs (GST-1205 review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- bin/gstack-lease | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/gstack-lease b/bin/gstack-lease index f4007f85a..1efc45145 100755 --- a/bin/gstack-lease +++ b/bin/gstack-lease @@ -280,6 +280,7 @@ case "$VERB" in } _tmp="$DIR/.$PID.$$" _id=$(identity "$PID") _keep="" _held=0 _now=$(date +%s) + [ -n "$_id" ] || _id=$(head -1 "$DIR/$PID" 2>/dev/null) if [ -f "$DIR/$PID" ] && [ "$(head -1 "$DIR/$PID" 2>/dev/null)" = "$_id" ]; then if [ -n "$RUN" ]; then _keep=$(fresh "$DIR/$PID" "run $RUN"); else _keep=$(fresh "$DIR/$PID" hold); fi [ -z "$(sed -n '2,$p' "$DIR/$PID" 2>/dev/null | grep -v '^$')" ] && _held=1