/dev/null not working for standardOutput on macOS
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.
Hey, thanks for your feedback. Unfortunately, the only machine I have to test this on is a linux machine. If you have any code changes that you can verify on your end, I'd be happy to merge them in. Otherwise, I'd suggest just piping the output to a file in the build directory.