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
% touch foo
% aria2c -i foo
No files to download.
% echo $?
0
Compare to:
aria2
zsh: correct 'aria2' to 'aria2c' [nyae]? y
Specify at least one URL.
Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
See 'aria2c -h'.
% echo $?
1
According to EXIT STATUS in aria2c(1), 0 means If all downloads were successful. You could argue that if there are no downloads to succeed, that then downloads are in fact successful; however this is a roundabout. I would suggest e.g. 3, If a resource was not found.
See also this discussion for wget (which unfortunately decided against a non-zero exit code):
I tend to leave exist status code as is. aria2 has relatively long history, so changing zero status code to nonzero may break existing third party code, and we'd like to avoid that.
Compare to:
According to
EXIT STATUS
inaria2c(1)
, 0 meansIf all downloads were successful.
You could argue that if there are no downloads to succeed, that then downloads are in fact successful; however this is a roundabout. I would suggest e.g. 3,If a resource was not found.
See also this discussion for wget (which unfortunately decided against a non-zero exit code):
http://www.mail-archive.com/wget@sunsite.dk/msg10655.html
The text was updated successfully, but these errors were encountered: