From 8d76effc178747f0c8f456fe619c1b014736a6af Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 11 Jul 2017 16:04:14 -0400 Subject: stdenv-setup: Make the package accumulators associative arrays instead of strings This is generally cleaner: less eval, less worrying about separators, and probably also faster. I got the idea from that python wrapper script. --- pkgs/development/interpreters/python/wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/development/interpreters') diff --git a/pkgs/development/interpreters/python/wrap.sh b/pkgs/development/interpreters/python/wrap.sh index 1c74e612b559..4b9b2024981a 100644 --- a/pkgs/development/interpreters/python/wrap.sh +++ b/pkgs/development/interpreters/python/wrap.sh @@ -86,7 +86,7 @@ wrapPythonProgramsIn() { _addToPythonPath() { local dir="$1" # Stop if we've already visited here. - if [ -n "${pythonPathsSeen[$dir]}" ]; then return; fi + [ -n "${pythonPathsSeen[$dir]}" ] || return 0 pythonPathsSeen[$dir]=1 # addToSearchPath is defined in stdenv/generic/setup.sh. It will have # the effect of calling `export program_X=$dir/...:$program_X`. -- cgit 1.4.1