[Bug 232201] sh(1): Using unset variables in here-doc with set -u does not cause the script to exit

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Dec 7 22:30:55 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232201

--- Comment #2 from Jilles Tjoelker <jilles at FreeBSD.org> ---
I think the behaviour here can be improved, but how it should work is not
immediately clear. This should take into account our previous behaviour, the
behaviour of other shells and POSIX (with the most recent interpretations). The
effect of expansions and errors in redirections varies depending on what kind
of command the redirection is applied to (special builtin, other simple
command, subshell, compound command).

Different from what I wrote in my previous comment, bash also has a different
error behaviour between true (shell aborts) and /usr/bin/true (shell continues
with non-zero exit status).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list