Skip to content

Redirect zig env stderr to /dev/null #98

@mitchellh

Description

@mitchellh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions