How to redirect output to /dev/null #26616
-
I’m setting up a composite action; at some point I compile and run an application to make sure it completes its execution without throwing an error. Its output is irrelevant however (I just want to make sure that the executable returns 0). How can I redirect the output to In a normal Linux environment I would do |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If that doesn’t help, which shell is your step using? Could you show an example of the problem? |
Beta Was this translation helpful? Give feedback.
-
Thank you airtower-luna :slight_smile: I do want to see the stderr output, that’s why I only want to redirect stdout. But I just went back to check my code and you’re right, there were lines that were outputting to stderr (which I’m not redirecting). So my bad! There’s no problem with redirection while running on a hosted runner. Thank you again! |
Beta Was this translation helpful? Give feedback.
1>
redirects only stdout, if there is any stderr output you don’t want to see you’ll need to redirect that, too.If that doesn’t help, which shell is your step using? Could you show an example of the problem?