Skip to content

Commit e70d3d8

Browse files
committed
build-manifest: make not finding toolstate info not fatal
1 parent 5670d04 commit e70d3d8

File tree

1 file changed

+12
-2
lines changed
  • src/tools/build-manifest/src

1 file changed

+12
-2
lines changed

src/tools/build-manifest/src/main.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,18 @@ impl Builder {
392392
}
393393
// Return the 2nd piece, the JSON.
394394
Some(pieces.next().expect("malformed toolstate line").to_owned())
395-
})
396-
.expect("failed to find toolstate for rust commit");
395+
});
396+
let toolstate = match toolstate {
397+
None => {
398+
eprintln!(
399+
"failed to find toolstate for rust commit {}; \
400+
going on without that information",
401+
rev,
402+
);
403+
return;
404+
}
405+
Some(toolstate) => toolstate,
406+
};
397407
let toolstate: HashMap<String, String> =
398408
serde_json::from_str(&toolstate).expect("toolstate is malformed JSON");
399409
// Mark some tools as missing based on toolstate.

0 commit comments

Comments
 (0)