[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [PATCH] set exit code to 1 if invalid host name specified
From: |
Daniel Manrique |
Subject: |
[Bug-wget] [PATCH] set exit code to 1 if invalid host name specified |
Date: |
Fri, 22 Apr 2011 20:54:56 -0400 |
Hello,
We're using wget to do some connectivity tests, and relying mainly on
exit status to determine success/failure.
We were surprised to find that for instance:
wget http://
exits with a status of 0 (indicating success), even though wget
clearly prints "Invalid host name".
This patch makes it so that wget exits with 1 (generic error code)
using inform_exit_status in the following situations:
1- Invalid host in command line (wget http://)
2- Invalid host in url-like input file (wget -i http://)
3- Invalid host in input file (wget -i input.txt and input.txt contains http://)
The patch also includes tests for these behaviors/situations.
I am assuming that the behavior I'm coding is desirable in these
situations. If that's not the case, or if my code could use
improvements, please let me know; it's the first time I contribute to
this project so I'm pretty sure things could be improved in my patch
:)
Thanks and regards,
- Daniel
exit-code-on-invalid-host.patch
Description: Text Data
- [Bug-wget] [PATCH] set exit code to 1 if invalid host name specified,
Daniel Manrique <=