We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 194d465 commit 1792edaCopy full SHA for 1792eda
src/checks.gleam
@@ -1,11 +1,13 @@
1
import gleam/io
2
import gleam/list
3
+import gleam/option
4
import gleam/string
5
import glexec as exec
6
import utils
7
8
pub fn checks(system_address_pairs: List(#(String, String))) {
9
io.println("📋 Preflight Checks:")
10
+ runner_has_nix()
11
use pair <- list.each(system_address_pairs)
12
let #(system, address) = pair
13
@@ -15,6 +17,14 @@ pub fn checks(system_address_pairs: List(#(String, String))) {
15
17
has_kexec(pair)
16
18
}
19
20
+fn runner_has_nix() {
21
+ let nix = exec.find_executable("nix")
22
+ case nix {
23
+ Error(_) -> io.println_error(" ❌ You don't have nix installed!")
24
+ Ok(_) -> io.println(" ✅ You have nix installed!")
25
+ }
26
+}
27
+
28
fn ping(system_address_pair: #(String, String)) {
29
let #(_system, address) = system_address_pair
30
0 commit comments