From 1795c8aab465606d615b56c73fe2c76112bf5ad7 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sat, 21 Nov 2020 22:49:51 -0700 Subject: Build nothing if checks attribute is missing in non-flakes mode (fixes #7) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 7d7fcf9..7261965 100644 --- a/src/main.rs +++ b/src/main.rs @@ -265,7 +265,7 @@ async fn check_deployment( false => { c.arg("-E") .arg("--no-out-link") - .arg(format!("let r = import {}/.; in (if builtins.isFunction r then (r {{}}) else r).checks.${{builtins.currentSystem}}", 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)) } }; -- cgit v1.2.3