Closed tuxiqae closed 5 years ago
That's… peculiar?
The only error in that format is here and a couple lines down, and the error can only have originated from this call chain, so either repo_url
would have to be empty despite being printed above, or http_proxy
is Some("")
.
You might have any of: $http_proxy
, $HTTP_PROXY
, $https_proxy
, $HTTPS_PROXY
set but empty, or have one of your configs messed up. If unset
ting one or all of the above still doesn't work, could you try the following patch on top of current master
for diagnosis?
diff --git a/src/ops/mod.rs b/src/ops/mod.rs
index aa11e32d4..ce4596128 100644
--- a/src/ops/mod.rs
+++ b/src/ops/mod.rs
@@ -905,17 +905,21 @@ pub fn find_proxy(crates_file: &Path) -> Option<String> {
.and_then(|t| t.as_table())
.and_then(|t| t.get("proxy"))
.and_then(|t| t.as_str()) {
+ println!("cargo proxy: {:?}", proxy);
return Some(proxy.to_string());
}
}
if let Ok(cfg) = GitConfig::open_default() {
if let Ok(s) = cfg.get_str("http.proxy") {
+ println!("git proxy: {:?}", s);
return Some(s.to_string());
}
}
- ["http_proxy", "HTTP_PROXY", "https_proxy", "HTTPS_PROXY"].iter().flat_map(env::var).next()
+ let ret = ["http_proxy", "HTTP_PROXY", "https_proxy", "HTTPS_PROXY"].iter().flat_map(env::var).next();
+ println!("env proxy: {:?}", ret);
+ ret
}
/// Find the bare git repository in the specified directory for the specified crate
Allowing empty environment proxies does seem like a bug, though, and if that turns out to be the culprit, I'll definitely correct it.
Well, I tried unsetting all 4 variables but it didn't help. After implementing the patches I ran the program and received the following output:
[user@localhost:~/Clones/cargo-update/target/release]$> ./cargo-install-update install-update racer env proxy: Some("") Updating registry 'https://github.com/rust-lang/crates.io-index' Failed to update index repository: malformed URL ''.
I might be free in the next 20 minutes, text me if you got any idea :)
Right, the commit referenced above should ignore all empty proxies, so if you could try with that?
Seems like it finally worked :) Good job mate!
Released in v1.8.4
.
Hi guys, When I try to run the command
cargo install-update --all
orcargo install-update <package name>
for some reason I receive the following error -I tried both force updating cargo-update and removing and installing it from scratch - both didn't solve the issue. I would like to add that it previously ran perfectly but stopped a couple of weeks ago.
I'm using Arch Linux 64-bit.
Thanks