aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-01-23 04:38:03 +0000
committerGitHub <[email protected]>2022-01-23 04:38:03 +0000
commit7cc887807552b2286c0db5806a9426b3bb50a2be (patch)
tree2e2b8e197bf66446aa4a045f5b9496ebc1702aae
parent23892b034d710bfbfa1f82c48fbfecb68f791f13 (diff)
parentbfb11bcffc93ce8a0849a5d72d5f9e11c79e9f43 (diff)
Merge pull request #33 from nerdypepper/fix/nix-presence
fix: nix binary should not be mandatory
-rw-r--r--Cargo.lock2
-rw-r--r--bin/Cargo.toml2
-rw-r--r--bin/src/utils.rs5
3 files changed, 3 insertions, 6 deletions
diff --git a/Cargo.lock b/Cargo.lock
index fe57dc9..0e32f66 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -507,7 +507,7 @@ dependencies = [
507 507
508[[package]] 508[[package]]
509name = "statix" 509name = "statix"
510version = "0.5.0" 510version = "0.5.1"
511dependencies = [ 511dependencies = [
512 "ariadne", 512 "ariadne",
513 "clap", 513 "clap",
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 @@
1[package] 1[package]
2name = "statix" 2name = "statix"
3version = "0.5.0" 3version = "0.5.1"
4edition = "2018" 4edition = "2018"
5license = "MIT" 5license = "MIT"
6authors = [ "Akshay <[email protected]>" ] 6authors = [ "Akshay <[email protected]>" ]
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(' ')