Here:
|
silent let s:env = system('zig env') |
On my NixOS system, when the dynamic linker is broken (an upstream bug that I'm waiting for a fix), it outputs some garbage to stderr about not being able to do some linking but otherwise runs the command successfully. However, zig.vim breaks because it tries to parse the full output as json.
To make this more robust, we should redirect stderr to /dev/null and just parse stdout. system always executes in the context of a shell1 so we just have to use 2>/dev/null.
I know this isn't zig.vim's bug, but this would make it more robust to system issues.