[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
Sat Mar 30 21:47:02 UTC 2019


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

--- Comment #3 from Jilles Tjoelker <jilles at FreeBSD.org> ---
Created attachment 203269
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203269&action=edit
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.

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


More information about the freebsd-bugs mailing list