Date: Mon, 26 Nov 2018 22:59:01 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 233545] bin/sh: "export VAR" always defines VAR unlike other shells Message-ID: <bug-233545-227-wj70FnLfZ8@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-233545-227@https.bugs.freebsd.org/bugzilla/> References: <bug-233545-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=3D233545 Jilles Tjoelker <jilles@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs@FreeBSD.org Assignee|bugs@FreeBSD.org |jilles@FreeBSD.org Status|New |Open --- Comment #2 from Jilles Tjoelker <jilles@FreeBSD.org> --- Good catch. It somewhat surprises me that this has been broken for so long. The environment() part of the patch looks good, but the exportcmd() part is redundant since setvar() already sets VUNSET if the value to be set is NULL (something like sh -uc 'export thisshouldnotbehere; echo "$thisshouldnotbehere"' detects the unset variable as it should). Also, a = test should be added, preferably using env(1) or ${SH} itself only and not printenv(1) since it's not in POSIX. --=20 You are receiving this mail because: You are on the CC list for the bug. 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-233545-227-wj70FnLfZ8>