p4sanity_check.sh � Typo in error message causes silent false-positive
grep -q '^info: Change' "$CmdLog" ||\
errmsg "No changelists detecgted in the output."
"detecgted" is a typo, but more importantly the grep pattern '^info: Change' is brittle � p4 -s changes prefixes each output line with info:, but the pattern is anchored to the beginning of the line and relies on the exact tagged output format. If output format varies (e.g. warnings, server messages prepend), this check silently passes when it shouldn't. The typo itself won't cause a runtime failure but indicates the error path is undertested.
Claude went on to suggest the following to make the grep more robust. I haven't made this change but here is the suggestion:
grep -qE '^info: Change [0-9]+ on [0-9]{4}/[0-9]{2}/[0-9]{2}' "$CmdLog" ||\
errmsg "No changelists detected in the output."