From a81512cfd2d7eed294f4ddc9b525a015e5ec9285 Mon Sep 17 00:00:00 2001 From: Jeffrey Lau <9203+zoonfafer@users.noreply.github.com> Date: Wed, 2 Feb 2022 09:54:07 +0800 Subject: Fix unhandled nix versions for linter 'nix' (#4045) Previously, it would not generate any lint messages for nix 2.5. Moreover, it would cause this error whenever the nix command is invoked, when paired with a custom `g:ale_command_wrapper`: Error detected while processing function 92_NeoVimCallback[29]..27[ 1]..90_ExitCallback[28]..ale_linters#nix#nix#Command: line 1: E684: list index out of range: 0 --- ale_linters/nix/nix.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ale_linters') diff --git a/ale_linters/nix/nix.vim b/ale_linters/nix/nix.vim index 3d91a9ec..7c2ce963 100644 --- a/ale_linters/nix/nix.vim +++ b/ale_linters/nix/nix.vim @@ -5,7 +5,7 @@ function! ale_linters#nix#nix#Command(buffer, output, meta) abort let l:version = a:output[0][22:] - if l:version =~# '^\(2.4\|3\).*' + if l:version =~# '^\(2.[4-9]\|3\).*' return 'nix-instantiate --log-format internal-json --parse -' else return 'nix-instantiate --parse -' -- cgit v1.2.3