stdenv: do not leak outputName out of loop
This is an implementation detail leaking out into the bash environment and it did manange to confuse me as potentially being a way to get the "default" output name when structuredAttrs is enabled, because of the "outputName" derivation attribute.
This commit is contained in:
@@ -29,10 +29,15 @@ if [[ -n "${NIX_ATTRS_JSON_FILE:-}" ]]; then
|
||||
__structuredAttrs=1
|
||||
echo "structuredAttrs is enabled"
|
||||
|
||||
for outputName in "${!outputs[@]}"; do
|
||||
# ex: out=/nix/store/...
|
||||
export "$outputName=${outputs[$outputName]}"
|
||||
done
|
||||
_exportOutputsByName() {
|
||||
local outputName
|
||||
for outputName in "${!outputs[@]}"; do
|
||||
# ex: out=/nix/store/...
|
||||
export "$outputName=${outputs[$outputName]}"
|
||||
done
|
||||
}
|
||||
|
||||
_exportOutputsByName
|
||||
else
|
||||
__structuredAttrs=
|
||||
: "${outputs:=out}"
|
||||
|
||||
Reference in New Issue
Block a user