Change 32710

mark_zinthefer (Mark Zinthefer)
Mark Zinthefer committed this change into //guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin
Request Review
Download .zip
Bug hunt with Claude

Justification:

p4sanity_check.sh � ThisScript variable strips too aggressively

declare ThisScript=${0##*}

The glob ##* strips everything up to and including the last * character � which in bash glob matching means it strips everything, leaving an empty string. The correct idiom to get the basename is ${0##*/} (strip up to last slash). As written, $ThisScript will always be empty, causing the usage and log messages to display a blank script name. This is a clear bug, just a cosmetic/diagnostic one.
  • Files 1
  • Comments 0
1 edited 0 added 0 deleted
p4sanity_check.sh#6
Loading...
Tip: Use n and p to cycle through the changes.