Skip to content

/dev/null not working for standardOutput on macOS #59

@rbarbey

Description

@rbarbey

I'm using ExecFork to start a kubectl port-forward command. Everytime a connection is forwarded kubectl prints a log line which itself is not interesting. That's why I set standardOutput to /dev/null. On Linux systems, this works fine but not so on macOS. Here I get the output

Execution failed for task 'portForward'.
> Unrecognised file type: Other

and build subsequently fails. In AbstractExecFork the field standardOutput is declared as RegularFileProperty which can't handle /dev/null on macOS. Interestingly on Linux, /dev/null is not a regular file either but rather:

$ file /dev/null
/dev/null: character special (1/3)

whereas on macOS the same command yields

$ file /dev/null
/dev/null: character special (3/2)

It would be cool if /dev/null could be supported cross-platform. Otherwise a not in the docs would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions