aboutsummaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authornotgne22021-02-19 16:30:28 -0700
committerGitHub2021-02-19 16:30:28 -0700
commitda25b206743aab65937ced8bfdc2401cf2e614da (patch)
treeee2d0c457615ecfdf74e678480b5b1ef8e5fefc8 /src/bin
parentfecc7e723db40c7e056371467275186b3bbb9ef3 (diff)
parentb8e28372500a0a5b14f501b63329a976462a0cc6 (diff)
Merge pull request #66 from serokell/notgne2/clean-up-command-args
Clean up adding Command arguments
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/deploy.rs14
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?;