Skip to content

Commit eaa481a

Browse files
authored
Merge pull request #301 from Eh2406/patch-1
Work around `search` not updating the index
2 parents 1d3eba4 + ced92e3 commit eaa481a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/toolchain.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ impl Toolchain {
155155
// This nop cargo command is to update the registry
156156
// so we don't have to do it for each crate.
157157
let toolchain_arg = "+".to_string() + &self.rustup_name();
158-
let full_args = [&toolchain_arg, "search", "lazy_static"];
159-
RunCommand::new(&installed_binary("cargo"), &full_args)
158+
// using `install` is a temporary solution until
159+
// https://github.com/rust-lang/cargo/pull/5961
160+
// is ready
161+
let full_args = [&toolchain_arg, "install", "lazy_static"];
162+
let _ = RunCommand::new(&installed_binary("cargo"), &full_args)
160163
.local_rustup()
161164
.quiet(true)
162165
.run()
@@ -165,7 +168,11 @@ impl Toolchain {
165168
"unable to update the index for toolchain {}",
166169
&self.rustup_name()
167170
)
168-
})
171+
});
172+
// ignore the error untill
173+
// https://github.com/rust-lang/cargo/pull/5961
174+
// is ready
175+
Ok(())
169176
}
170177
}
171178

0 commit comments

Comments
 (0)