aboutsummaryrefslogtreecommitdiff
path: root/src/bin/deploy.rs
diff options
context:
space:
mode:
authornotgne22021-02-09 21:41:53 -0700
committernotgne22021-02-09 21:41:53 -0700
commitb8e28372500a0a5b14f501b63329a976462a0cc6 (patch)
treeee2d0c457615ecfdf74e678480b5b1ef8e5fefc8 /src/bin/deploy.rs
parentfecc7e723db40c7e056371467275186b3bbb9ef3 (diff)
Clean up adding Command arguments
Diffstat (limited to 'src/bin/deploy.rs')
-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?;