stdenv: don't clobber useArray and type in {prepend,append}ToVar

Some other packages, for example ruby gems via buildRubyGem, use a
variable called "type" internally, which is overwritten here and
causes failures like:

    failure: $gempkg path unspecified

Fix for changes in 11c3127e38.
This commit is contained in:
Andrew Childs 2023-01-18 11:55:26 +09:00
parent 2c48770293
commit 68f1182b65

View file

@ -206,8 +206,8 @@ addToSearchPath() {
# syntax when they switch to setting __structuredAttrs = true.
prependToVar() {
local -n nameref="$1"
local useArray type
useArray=
if [ -n "$__structuredAttrs" ]; then
useArray=true
else
@ -239,8 +239,8 @@ prependToVar() {
# Same as above
appendToVar() {
local -n nameref="$1"
local useArray type
useArray=
if [ -n "$__structuredAttrs" ]; then
useArray=true
else