aboutsummaryrefslogtreecommitdiff
path: root/bin/src/utils.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-01-23 04:28:11 +0000
committerAkshay <[email protected]>2022-01-23 04:29:32 +0000
commitbfb11bcffc93ce8a0849a5d72d5f9e11c79e9f43 (patch)
tree2e2b8e197bf66446aa4a045f5b9496ebc1702aae /bin/src/utils.rs
parent23892b034d710bfbfa1f82c48fbfecb68f791f13 (diff)
fix: nix binary should not be mandatoryfix/nix-presence
Diffstat (limited to 'bin/src/utils.rs')
-rw-r--r--bin/src/utils.rs5
1 files changed, 1 insertions, 4 deletions
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<SyntaxKind, Vec<&'static Box<dyn Lint>>> {
25 25
26pub fn get_version_info() -> Option<String> { 26pub fn get_version_info() -> Option<String> {
27 use std::process::Command; 27 use std::process::Command;
28 let program = Command::new("nix") 28 let program = Command::new("nix").arg("--version").output().ok()?;
29 .arg("--version")
30 .output()
31 .expect("failed to execute");
32 std::str::from_utf8(&program.stdout) 29 std::str::from_utf8(&program.stdout)
33 .ok()? 30 .ok()?
34 .split(' ') 31 .split(' ')