1
Fork 0

Correctly strip newlines from output

This commit is contained in:
Jake Howard 2020-10-05 21:32:11 +01:00
parent 4dd1db342b
commit ef358ec35e
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -37,7 +37,11 @@ impl ComposeProject {
.output()
.expect("Failed to get images");
let stdout = String::from_utf8(output.stdout).expect("Failed to parse output");
stdout.trim().split('\n').map(String::from).collect()
stdout
.split('\n')
.map(String::from)
.filter(|s| !s.is_empty())
.collect()
}
pub fn down(&self) -> bool {