Yeah there's no good solution for this in shell -- you're damned if you do, and damned if you don't.
Yeah there's no good solution for this in shell -- you're damned if you do, and damned if you don't. bash has inherit_errexit to fix a longstanding bug, but even that's not enough. Oil has shopt -s strict_errexit and more_errexit that fixes even more. https://github.com/oilshell/oil/issues/476 I'm still looking for feedback and there's probably one more thing I want to change. Although the fundamental problem is that errors (success/fail) and boolean values (true/false) are conflated in the status code, so it's a tough problem. In Oil you will be encouraged to use expressions for booleans, not statements, e.g. ls / # success/fail if (x > 0) { } # true/false rather than ls / if test $x -lt 0; then ...
Posted by chubot on Feb 1, 2020, 11:45 PM
Tags
Related issues
- [BUG] Cowork (Windows): all Plan9 shares fail with "Plan9 mount failed: invalid argument" after Windows update KB5124008 (26200.9445) — uninstalling the KB fixe
- Feature Request: Auto-resume CLI session when usage limit resets
- Please deobfuscate the Python
- [Bug] MLX version of Gemma 4 26B fails to load: "Model type gemma4 not supported" (macOS)
- # 233 Developers Discussed Abandoning the Office Add-in Platform — An Open Letter on the Office.js Stability, Security & Trust Crisis
- [FEATURE] Allow users to configure which shell the Bash tool uses or inherit initial shell
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
reliability (Software)
[BUG] Cowork (Windows): all Plan9 shares fail with "Plan9 mount failed: invalid argument" after Windows update KB5124008 (26200.9445) — uninstalling the KB fixe
Feature Request: Auto-resume CLI session when usage limit resets
Please deobfuscate the Python
[Bug] MLX version of Gemma 4 26B fails to load: "Model type gemma4 not supported" (macOS)
# 233 Developers Discussed Abandoning the Office Add-in Platform — An Open Letter on the Office.js Stability, Security & Trust Crisis
[FEATURE] Allow users to configure which shell the Bash tool uses or inherit initial shell
Admin Materials and Surfaces
AMD Support
Yeah there's no good solution for this in shell -- you're damned if you do, and damned if you don't.
Yeah there's no good solution for this in shell -- you're damned if you do, and damned if you don't. bash has inherit_errexit to fix a longstanding bug, but even that's not enough. Oil has shopt -s strict_errexit and more_errexit that fixes even more. https://github.com/oilshell/oil/issues/476 I'm still looking for feedback and there's probably one more thing I want to change. Although the fundamental problem is that errors (success/fail) and boolean values (true/false) are conflated in the status code, so it's a tough problem. In Oil you will be encouraged to use expressions for booleans, not statements, e.g. ls / # success/fail if (x > 0) { } # true/false rather than ls / if test $x -lt 0; then ...
Comments (0)
No comments yet. Start the discussion.