diff options
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | bin/Cargo.toml | 2 | ||||
-rw-r--r-- | bin/src/utils.rs | 5 |
3 files changed, 3 insertions, 6 deletions
@@ -507,7 +507,7 @@ dependencies = [ | |||
507 | 507 | ||
508 | [[package]] | 508 | [[package]] |
509 | name = "statix" | 509 | name = "statix" |
510 | version = "0.5.0" | 510 | version = "0.5.1" |
511 | dependencies = [ | 511 | dependencies = [ |
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] |
2 | name = "statix" | 2 | name = "statix" |
3 | version = "0.5.0" | 3 | version = "0.5.1" |
4 | edition = "2018" | 4 | edition = "2018" |
5 | license = "MIT" | 5 | license = "MIT" |
6 | authors = [ "Akshay <[email protected]>" ] | 6 | authors = [ "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 | ||
26 | pub fn get_version_info() -> Option<String> { | 26 | pub 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(' ') |