fix: rm newline in version
This commit is contained in:
parent
23f4922a18
commit
be66de4c8f
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ impl Docker {
|
||||||
.expect("unable to obtain Docker version");
|
.expect("unable to obtain Docker version");
|
||||||
let x = String::from_utf8(version.stdout).unwrap();
|
let x = String::from_utf8(version.stdout).unwrap();
|
||||||
let x: Vec<&str> = x.split("Docker version ").collect();
|
let x: Vec<&str> = x.split("Docker version ").collect();
|
||||||
x.get(1).unwrap().to_string()
|
x.get(1).unwrap().trim().to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_container(name: &str, img: &str) {
|
pub fn run_container(name: &str, img: &str) {
|
||||||
|
|
Loading…
Reference in a new issue