about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-11 16:04:14 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-12 15:30:56 -0400
commit8d76effc178747f0c8f456fe619c1b014736a6af (patch)
treed833ef116289f001853ec787a0ee6d91ffd776cc /pkgs/development/interpreters
parent3cb745d5a69018829ac15f7d5a508135f6bda123 (diff)
downloadnixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar
nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.gz
nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.bz2
nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.lz
nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.xz
nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.tar.zst
nixlib-8d76effc178747f0c8f456fe619c1b014736a6af.zip
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.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/wrap.sh2
1 files changed, 1 insertions, 1 deletions
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`.