Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2019 21:46:59 +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-5SKlEODs82@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 #3 from Jilles Tjoelker <jilles@FreeBSD.org> ---
Created attachment 203269
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D203269&action=
=3Dedit
experimental patch to stop ignoring here-document expansion errors

The simplest thing that could possibly work is to treat an expansion error =
in a
here-document the same way as an expansion error in a redirection filename =
or
file descriptor number. Such an error will cause the script or subshell to =
be
aborted ('command .' and 'command eval' can also "catch" such an error).

Trying to build a few ports using that does not appear to cause breakage.

--=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-5SKlEODs82>