Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@drewdevault @lanodan @gloopsies @m0xee @phel GNU true's implementation is correct.
It would be incorrect to return success if the write operation failed on --version.
If you want it to return true - just don't request the version or help.
If for some bizarre reason you want a version of true without flags that will tell you the license, you can just use GNU bash's true built-in.
>One common use for true is replacing another program with it to shim or mock it so that it disregards the command line and always exits successfully
In that usage, you won't be passing --version or --help to true, let alone piping to /dev/full or somewhere else that will fail to write, so that is a non-issue.