Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return non-0 exit status on error(s) #7

Open
eadmaster opened this issue May 1, 2024 · 2 comments
Open

return non-0 exit status on error(s) #7

eadmaster opened this issue May 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@eadmaster
Copy link

eadmaster commented May 1, 2024

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
@kovalensky
Copy link
Owner

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.

@eadmaster
Copy link
Author

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

			exit(1); }

(die() always exit with a 0 status)

@kovalensky kovalensky added the enhancement New feature or request label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants