Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2018 20:23:19 +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@https.bugs.freebsd.org/bugzilla/>

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

            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: bugs@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: jilles@FreeBSD.org

Created attachment 199580
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D199580&action=
=3Dedit
v0 (blind backport)

I'm trying to build a project that conditionally defines variables but alwa=
ys
exports them. With FreeBSD sh those unset end up defined with empty value. =
If
make/gmake/etc is later invoked ?=3D assignments are ignored.

  $ env -i sh -c 'export CC; printenv' | fgrep CC
  CC=3D
  $ 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

--=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-233545-227>