mirror of
https://github.com/oppiliappan/statix.git
synced 2024-09-11 09:15:45 +03:00
fix: nix binary should not be mandatory
This commit is contained in:
parent
23892b034d
commit
bfb11bcffc
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -507,7 +507,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "statix"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
dependencies = [
|
||||
"ariadne",
|
||||
"clap",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "statix"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
authors = [ "Akshay <nerdy@peppe.rs>" ]
|
||||
|
@ -25,10 +25,7 @@ pub fn lint_map() -> HashMap<SyntaxKind, Vec<&'static Box<dyn Lint>>> {
|
||||
|
||||
pub fn get_version_info() -> Option<String> {
|
||||
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(' ')
|
||||
|
Loading…
Reference in New Issue
Block a user