You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the tz -list <value> option can be used to search for timezone names and abbreviations. However, if no names are found, then tz simple prints nothing (not even an error message) and exits with ‘success’ status code 0. This is contrary to the UNIX convention of non-zero (error code) exit. For example, most search utilities (e.g. grep) will return 1 if there are no matches. It could be good if tz follows this convention, so that the exit code of tz -list <value> is the same as the exit code of tz -list | grep <value>. This would also ensure tz exits non-zero if tz’s internal tz list is empty for some reason. Also, given that this is a user mode option, it could also be good to print an error message to stderr.
The text was updated successfully, but these errors were encountered:
jnd-au
added a commit
to jnd-au/tz
that referenced
this issue
Oct 28, 2024
Currently, the
tz -list <value>
option can be used to search for timezone names and abbreviations. However, if no names are found, then tz simple prints nothing (not even an error message) and exits with ‘success’ status code 0. This is contrary to the UNIX convention of non-zero (error code) exit. For example, most search utilities (e.g.grep
) will return 1 if there are no matches. It could be good iftz
follows this convention, so that the exit code oftz -list <value>
is the same as the exit code oftz -list | grep <value>
. This would also ensure tz exits non-zero if tz’s internal tz list is empty for some reason. Also, given that this is a user mode option, it could also be good to print an error message to stderr.The text was updated successfully, but these errors were encountered: