From e70d3d838bd522013dc5a8e3aa401af930f2336a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 17 Sep 2019 10:01:35 +0200 Subject: [PATCH] build-manifest: make not finding toolstate info not fatal --- src/tools/build-manifest/src/main.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index c2d642bb136be..110de15b55661 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -392,8 +392,18 @@ impl Builder { } // Return the 2nd piece, the JSON. Some(pieces.next().expect("malformed toolstate line").to_owned()) - }) - .expect("failed to find toolstate for rust commit"); + }); + let toolstate = match toolstate { + None => { + eprintln!( + "failed to find toolstate for rust commit {}; \ + going on without that information", + rev, + ); + return; + } + Some(toolstate) => toolstate, + }; let toolstate: HashMap = serde_json::from_str(&toolstate).expect("toolstate is malformed JSON"); // Mark some tools as missing based on toolstate.