[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Rejected: Bug#331532: change §10.4 "set -e OR check return status" to AND or be rewritten



This proposal disagrees with the current Policy recommendation that shell
scripts start with set -e or check the exit status of each command.  The
contention in this proposal is that this makes shell scripts unnecessarily
intolerant to problems and scripts should instead continue where possible
after errors.

This is the opposite of the intention of the Policy recommendation, which
is to ensure that all operations in scripts are checked for errors.  The
ignore-by-default error handling in shells is a standard problem with
shell scripting, leading to scripts proceeding dangerously after an error
that should have been fatal.

Debian at this point has significant experience with shell scripts using
set -e, both in maintainer scripts and elsewhere, and this is common
accepted practice.  I don't think there is consensus in this bug report
for a change.  I'm therefore rejecting this proposal.  Due to the lack of
extensive discussion in the original bug report, this is a soft rejection,
meaning that if someone feels strongly about this proposal and wants to
step forward to champion it again, I'd be willing to reopen the bug.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: