File tree Expand file tree Collapse file tree 6 files changed +7
-7
lines changed
Expand file tree Collapse file tree 6 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1919
2020# Filter out nix python packages from PYTHONPATH.
2121# This avoids conflicts between nix-installed packages and poetry virtual environment packages.
22- PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' ) "
22+ PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' || : ) "
2323if [ -n " ${PYTHONPATH:- } " ]; then
2424 export PYTHONPATH
2525else
Original file line number Diff line number Diff line change 2424
2525# Filter out nix python packages from PYTHONPATH.
2626# This avoids conflicts between nix-installed packages and poetry virtual environment packages.
27- PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' ) "
27+ PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' || : ) "
2828if [ -n " ${PYTHONPATH:- } " ]; then
2929 export PYTHONPATH
3030else
@@ -47,7 +47,7 @@ mkdir -p "$TMPDIR"
4747export TMPDIR
4848
4949# Remove ghcup from PATH to avoid conflicts with nix environment
50- PATH=" $( echo " $PATH " | tr " :" " \n" | grep -v " ghcup" | tr " \n" " :" | sed ' s/:*$//' ) "
50+ PATH=" $( echo " $PATH " | tr " :" " \n" | grep -v " ghcup" | tr " \n" " :" | sed ' s/:*$//' || : ) "
5151export PATH
5252
5353# Prepend instance-specific .bin directory to PATH if it exists and if not already present
Original file line number Diff line number Diff line change 1818
1919# Filter out nix python packages from PYTHONPATH.
2020# This avoids conflicts between nix-installed packages and poetry virtual environment packages.
21- PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' ) "
21+ PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' || : ) "
2222if [ -n " ${PYTHONPATH:- } " ]; then
2323 export PYTHONPATH
2424else
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ if [ -z "\${IN_NIX_SHELL:-""}" ]; then
5454 echo "WARNING: This script is supposed to be sourced from nix shell." >&2
5555fi
5656source "$VIRTUAL_ENV /bin/activate"
57- PYTHONPATH="\$ (echo "\$ {PYTHONPATH:-}" | tr ":" "\n" | grep -v "/nix/store/.*/site-packages" | tr "\n" ":" | sed 's/:*$//')"
57+ PYTHONPATH="\$ (echo "\$ {PYTHONPATH:-}" | tr ":" "\n" | grep -v "/nix/store/.*/site-packages" | tr "\n" ":" | sed 's/:*$//' || : )"
5858if [ -n "\$ {PYTHONPATH:-}" ]; then
5959 export PYTHONPATH
6060else
Original file line number Diff line number Diff line change 2626
2727# Filter out nix python packages from PYTHONPATH.
2828# This avoids conflicts between nix-installed packages and poetry virtual environment packages.
29- PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' ) "
29+ PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' || : ) "
3030if [ -n " ${PYTHONPATH:- } " ]; then
3131 export PYTHONPATH
3232else
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ set -eu
1111filter_out_nix (){
1212 # Filter out nix python packages from PYTHONPATH.
1313 # This avoids conflicts between nix-installed packages and poetry virtual environment packages.
14- PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' ) "
14+ PYTHONPATH=" $( echo " ${PYTHONPATH:- } " | tr " :" " \n" | grep -v " /nix/store/.*/site-packages" | tr " \n" " :" | sed ' s/:*$//' || : ) "
1515 if [ -n " ${PYTHONPATH:- } " ]; then
1616 export PYTHONPATH
1717 else
You can’t perform that action at this time.
0 commit comments