Exit code for missing domain is 0 but should be non-zero
The exit code when you try to download a missing / bogus domain is still 0
, but it should obviously not be zero.
$ wget http://nosuchdomainreallynodomain.abc -O /dev/null
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
Failed to resolve 'nosuchdomainreallynodomain.abc' (Name or service not known)
[Files: 0 Bytes: 0 [0 B/s] Re]
$ echo $?
0