tmrr icon indicating copy to clipboard operation
tmrr copied to clipboard

return non-0 exit status on error(s)

Open eadmaster opened this issue 9 months ago • 2 comments

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

eadmaster avatar May 01 '24 20:05 eadmaster

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.

kovalensky avatar May 02 '24 09:05 kovalensky

i've found this is a very easy fix by adding to this line:

			exit(1); }

(die() always exit with a 0 status)

eadmaster avatar May 02 '24 15:05 eadmaster