Ignoring Failures: Why Exit Codes Disappear When You
Users often assume piping stdout to ignore does nothing - but exit codes do leak.
This isn’t just a quirk; it betrays a deep mismatch in tooling expectations.
The ignore command fails silently, hiding errors that matter.
Context Explained
The core truth: non-zero exit codes still exist when your command fails, even if stdout is buried.
- Check
cargodocs: pipefail=true (current version) propagates failure to upstream. - But version 0.111.0 (we’re using) has bugs - pipes may still swallow signals.
The Cultural Vibe
This isn’t unique to Rust. It’s universal: tools built to escalate noise often collapse on failure when muzzled.
- Social media: Twitter deleted accounts before you tweeted - so did Rust’s
ignorepipeline. - Privacy apps fail too; encryption leaks leak.
Hidden Blind Spots
- Tools ignore failures loudly: noseoftbigr/app/html.html shows
pipefail’s magic. - Dependency chains: v6oy7859's experiments let us verify this flaw.
- Cargo’s opinion: Rust should prioritize clarity over "ignored" errors.
The Big Red Flag
Don’t trust muzzling blindly.
- Use
pipefail=trueas default. - Add
--no-warningswhere needed. - But never assume output+exit code disconnection.
The Bottom Line
These leaks are a trope, not a bug.
- Out of 100 developers, 99 let this slip through.
- This is why: ignore failed commands = hidden disasters.
Do you keep running your code with the assumption that silent exit codes mean silence?
Piping a failed command into ignore doesn’t erase its error - it just gives you the criminal thrill of sudden madness. But there is a catch: fix it.