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
1 changed files with 6 additions and 0 deletions

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())
}
}