Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Dec 2018 22:30:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 232201] sh(1): Using unset variables in here-doc with set -u does not cause the script to exit
Message-ID:  <bug-232201-227-G9Q27CaUep@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-232201-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-232201-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232201

--- Comment #2 from Jilles Tjoelker <jilles@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 ki=
nd
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 differe=
nt
error behaviour between true (shell aborts) and /usr/bin/true (shell contin=
ues
with non-zero exit status).

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232201-227-G9Q27CaUep>