Skip to content

Commit 9a68b2a

Browse files
authored
Merge pull request #61 from Mark-Simulacrum/no-locked
Prepare dependencies without locking Cargo.lock
2 parents 4328f83 + 4131ea0 commit 9a68b2a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/prepare.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,19 @@ impl<'a> Prepare<'a> {
141141
}
142142

143143
fn fetch_deps(&mut self) -> Result<(), Error> {
144-
let mut outdated_lockfile = false;
145144
let mut missing_deps = false;
146145
let res = Command::new(self.workspace, self.toolchain.cargo())
147-
.args(&["fetch", "--locked", "--manifest-path", "Cargo.toml"])
146+
.args(&["fetch", "--manifest-path", "Cargo.toml"])
148147
.cd(&self.source_dir)
149148
.process_lines(&mut |line, _| {
150-
if line.ends_with(
151-
"Cargo.lock needs to be updated but --locked was passed to prevent this",
152-
) {
153-
outdated_lockfile = true;
154-
} else if line.contains("failed to load source for dependency") {
149+
if line.contains("failed to load source for dependency") {
155150
missing_deps = true;
156151
}
157152
})
158153
.run();
159154
match res {
160155
Ok(_) => Ok(()),
161-
Err(_) if outdated_lockfile && !self.lockfile_captured => {
156+
Err(_) if !self.lockfile_captured => {
162157
info!("the lockfile is outdated, regenerating it");
163158
// Force-update the lockfile and recursively call this function to fetch
164159
// dependencies again.

0 commit comments

Comments
 (0)