diff --git a/lychee-lib/src/types/input.rs b/lychee-lib/src/types/input.rs index a0fba1ca3e..c32be7feb8 100644 --- a/lychee-lib/src/types/input.rs +++ b/lychee-lib/src/types/input.rs @@ -140,7 +140,11 @@ impl Input { Ok(url) if url.scheme() == "http" || url.scheme() == "https" => { InputSource::RemoteUrl(Box::new(url)) } - Ok(_) | _ => { + Ok(_) => { + // URL parsed successfully, but it's not http or https + return Err(ErrorKind::InvalidFile(PathBuf::from(value))); + } + _ => { // this seems to be the only way to determine if this is a glob pattern let is_glob = glob::Pattern::escape(value) != value;