Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rbarbey opened this issue Sep 26, 2022 · 1 comment
Open

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

rbarbey opened this issue Sep 26, 2022 · 1 comment

Comments

@rbarbey
Copy link

rbarbey commented Sep 26, 2022

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.

@psxpaul
Copy link
Owner

psxpaul commented Nov 1, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants