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/Cargo.toml | 2 +- bin/src/utils.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/Cargo.toml b/bin/Cargo.toml index db1151a..90c7081 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "statix" -version = "0.5.0" +version = "0.5.1" edition = "2018" license = "MIT" authors = [ "Akshay " ] 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