Skip to content

Print error upon network failure

username-removed-616581 requested to merge beneills/cargo-info:master into master

Added handling code to detect network errors and fail the command if any crates cannot be queried from the internet. In that case, we print a custom message to stderr and return 1.

Tested working and non-working cases:

narcissus:cargo-info ben$ target/debug/cargo-info info clippy
network error: failed to lookup address information: nodename nor servname provided, or not known
narcissus:cargo-info ben$ echo $?
1

Merge request reports