'How to hide all Nimble and Nim outputs including errors?
How can I hide all Nimble and Nil outputs including errors?
I used this command nimble build --silent, but it still throws errors when there are errors.
How can I disable that?
Solution 1:[1]
It sounds as though, what you want to accomplish is to hide all output from nim and nimble.
While it's unclear why this would be desirable, you can hide all outputs quite easily. This isn't restricted to nim and nimble, but any program.
Though it does somewhat depend on where you are running the command.
On linux / sh, you can hide outputs by redirecting to /dev/null:
program &> /dev/null
On windows, in cmd or batch files, you would:
program > NUL 2> NUL
whereas on powershell you would:
program > $null 2> $null
What actually happens in that case is that stdout and stderr are being replaced. This makes it so that what is being written to these streams is never actually outputed. If you only wanted to temporarily hide them, but see/check the outputs later, you could also substitute /dev/null , NUL or $null with a file path, which is where the output would be written to as a file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jonas V |
