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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-03 07:59:38 +00:00
1 parent 76f67dbcdb
commit 14524f7e49
1 file changed
+1
+1
View File
@@ -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