1
Fork 0

Add helper to run compose

This commit is contained in:
Jake Howard 2020-10-05 19:02:48 +01:00
parent 120fea2a62
commit 790d163de0
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -25,4 +25,10 @@ impl ComposeProject {
.args(arguments)
.output()
}
fn docker_compose(&self, arguments: &[&str])-> Result<Output> {
let mut compose_arguments = vec!["-f", self.compose_file.to_str().expect("Path parse failed")];
compose_arguments.extend_from_slice(arguments);
self.execute_in_dir("docker-compose", compose_arguments.as_slice())
}
}