IssueRaiser

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

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

reliability (Software)

Yeah there's no good solution for this in shell -- you're damned if you do, and damned if you don't.

chubotFeb 1, 2020, 11:45 PM

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.

Comment on this issue