From bfb11bcffc93ce8a0849a5d72d5f9e11c79e9f43 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 23 Jan 2022 09:58:11 +0530 Subject: fix: nix binary should not be mandatory --- bin/src/utils.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bin/src/utils.rs') diff --git a/bin/src/utils.rs b/bin/src/utils.rs index 1adac4a..d3bff54 100644 --- a/bin/src/utils.rs +++ b/bin/src/utils.rs @@ -25,10 +25,7 @@ pub fn lint_map() -> HashMap>> { pub fn get_version_info() -> Option { use std::process::Command; - let program = Command::new("nix") - .arg("--version") - .output() - .expect("failed to execute"); + let program = Command::new("nix").arg("--version").output().ok()?; std::str::from_utf8(&program.stdout) .ok()? .split(' ') -- cgit v1.2.3