tmrr
tmrr copied to clipboard
return non-0 exit status on error(s)
e.g.
$ php tmrr.php e Denpa_Music_Collection_v1.0.torrent
--- Unprocessed files: ---
File: Denpa_Music_Collection_v1.0.torrent
Error type: This is an invalid hybrid or v2 torrent.
v1 torrents do not support displaying file hashes.
$ echo $?
0 # expecting non-0 exit code here
Hello, error status is always displayed in the end, before that, there could be some successful output from valid v2 files.
I'm not sure if it's necessary to send exit code here, but I'm open to suggestions.
i've found this is a very easy fix by adding to this line:
exit(1); }
(die()
always exit with a 0
status)