nix: durably handle versions before 2.4 (#4398)

What I should have done in 4394. Idea: @w0rp
This commit is contained in:
Antonio Gurgel 2022-12-28 04:05:32 -08:00 committed by GitHub
parent 457e0a50f1
commit ef6715ee41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -5,10 +5,10 @@
function! ale_linters#nix#nix#Command(buffer, output, meta) abort
let l:version = a:output[0][22:]
if l:version =~# '^\(2.[4-9]\|2.[1-9][0-9]\+\|3\).*'
return 'nix-instantiate --log-format internal-json --parse -'
else
if l:version =~# '^\(1\|2.[0-3]\.\).*'
return 'nix-instantiate --parse -'
else
return 'nix-instantiate --log-format internal-json --parse -'
endif
endfunction