From 209e1e58c7015dc2e503a4c096dc5a3bc840931e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 30 Mar 2021 15:25:26 +0200 Subject: [PATCH] job: filter out empty lines from .lohr file --- src/job.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/job.rs b/src/job.rs index 1a15233..2e91cf1 100644 --- a/src/job.rs +++ b/src/job.rs @@ -125,7 +125,13 @@ impl Job { let output = String::from_utf8(output.stdout)?; - Ok(Some(output.lines().map(String::from).collect())) + Ok(Some( + output + .lines() + .map(String::from) + .filter(|s| !s.is_empty()) + .collect(), + )) } fn get_remotes(&self, config: &GlobalSettings) -> anyhow::Result> {