diff --git a/pkgs/development/compilers/ghc/ghc-get-packages.sh b/pkgs/development/compilers/ghc/ghc-get-packages.sh index 4593ead17d31..7f47cd30a151 100755 --- a/pkgs/development/compilers/ghc/ghc-get-packages.sh +++ b/pkgs/development/compilers/ghc/ghc-get-packages.sh @@ -11,11 +11,11 @@ else fi PATH="$2:$PATH" IFS=":" -PKGS="" +PKGS=() for p in $PATH; do PkgDir="$p/../lib/ghc-pkgs/ghc-$version" for i in $PkgDir/*.installedconf; do - test -f $i && PKGS="$PKGS $prefix$i" + test -f $i && PKGS[${#PKGS[*]}]="$prefix$i" done done -echo $PKGS +echo ${PKGS[*]}