oppiliappan / statix

lints and suggestions for the nix programming language
https://git.peppe.rs/languages/statix/about
MIT License
557 stars 21 forks source link

0.5.0 requires `nix` installation #32

Closed chenrui333 closed 2 years ago

chenrui333 commented 2 years ago

👋 it looks like 0.5.0 release requires nix installation to make it work, any way that we can make it optional?

here is the error message when I dont have nix installed

$ RUST_BACKTRACE=1 statix check test.nix
thread 'main' panicked at 'failed to execute: Os { code: 2, kind: NotFound, message: "No such file or directory" }', bin/src/utils.rs:31:10
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: statix::utils::get_version_info
   4: statix::config::ConfFile::version
   5: statix::lint::main::main
   6: statix::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
oppiliappan commented 2 years ago

ah this was a small oversight, nix should not be necessary.