From 01431827ddb596b0c79f9f805cb5f3224f7c0895 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sat, 20 Mar 2021 16:31:31 -0700 Subject: [PATCH] Fix a bug in the UI importer that happens the first time you run it. #523 --- importer/src/bin/one_step_import.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/importer/src/bin/one_step_import.rs b/importer/src/bin/one_step_import.rs index 3bb3533d7b..e32db0a7e0 100644 --- a/importer/src/bin/one_step_import.rs +++ b/importer/src/bin/one_step_import.rs @@ -49,7 +49,9 @@ async fn main() -> Result<()> { .arg("boundary0.poly") .output()?; assert!(out.status.success()); - String::from_utf8(out.stdout)? + // pick_geofabrik might output extra lines while downloading the index. Grab the last line. + let output = String::from_utf8(out.stdout)?; + output.trim().split("\n").last().unwrap().trim().to_string() }; // Name the temporary map based on the Geofabrik region.