On 11/19/2013 05:02 PM, Linda Walsh wrote: > I'm not see what would break. instead of failing to remove a non-empty > directory, it would remove it (if it was empty and permissions allowed).
That's what would break. Scripts have been written to assume that 'rm empty_dir' will fail, and your proposal would change that assumption. Falling through to subsequent commands when you used to bail out early has all sorts of subtle implications, that we aren't willing to risk. > I would ask how it would fail in a script -- I.e. we are only talking > empty directories -- and currently an error would be returned if > a script tried to do that. If the script was catching errors or running > with "-e", the script would terminate under the current implementation. 'set -e' is useless. I highly recommend that script writers avoid it. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature