https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233545
Bug ID: 233545
Summary: bin/sh: "export VAR" always defines VAR unlike other
shells
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Created attachment 199580
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=199580&action=edit
v0 (blind backport)
I'm trying to build a project that conditionally defines variables but always
exports them. With FreeBSD sh those unset end up defined with empty value. If
make/gmake/etc is later invoked ?= assignments are ignored.
$ env -i sh -c 'export CC; printenv' | fgrep CC
CC=
$ env -i sh -c 'export CC; make -V CC'
dash, pdksh, bash, zsh aren't affected. NetBSD sh fixed it in
https://github.com/netbsd/src/commit/9ad7f3a0e1b5
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"