diff options
author | notgne2 | 2021-02-19 16:30:28 -0700 |
---|---|---|
committer | GitHub | 2021-02-19 16:30:28 -0700 |
commit | da25b206743aab65937ced8bfdc2401cf2e614da (patch) | |
tree | ee2d0c457615ecfdf74e678480b5b1ef8e5fefc8 /src/bin | |
parent | fecc7e723db40c7e056371467275186b3bbb9ef3 (diff) | |
parent | b8e28372500a0a5b14f501b63329a976462a0cc6 (diff) |
Merge pull request #66 from serokell/notgne2/clean-up-command-args
Clean up adding Command arguments
Diffstat (limited to '')
-rw-r--r-- | src/bin/deploy.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bin/deploy.rs b/src/bin/deploy.rs index 8bd8b18..756c97c 100644 --- a/src/bin/deploy.rs +++ b/src/bin/deploy.rs @@ -107,26 +107,24 @@ async fn check_deployment( ) -> Result<(), CheckDeploymentError> { info!("Running checks for flake in {}", repo); - let mut c = match supports_flakes { + let mut check_command = match supports_flakes { true => Command::new("nix"), false => Command::new("nix-build"), }; - let mut check_command = match supports_flakes { + match supports_flakes { true => { - c.arg("flake") - .arg("check") - .arg(repo) + check_command.arg("flake").arg("check").arg(repo); } false => { - c.arg("-E") + check_command.arg("-E") .arg("--no-out-link") - .arg(format!("let r = import {}/.; x = (if builtins.isFunction r then (r {{}}) else r); in if x ? checks then x.checks.${{builtins.currentSystem}} else {{}}", repo)) + .arg(format!("let r = import {}/.; x = (if builtins.isFunction r then (r {{}}) else r); in if x ? checks then x.checks.${{builtins.currentSystem}} else {{}}", repo)); } }; for extra_arg in extra_build_args { - check_command = check_command.arg(extra_arg); + check_command.arg(extra_arg); } let check_status = check_command.status().await?; |