Skip to content

Commit c70ab06

Browse files
committed
disable --user when in virtualenv
1 parent 3678f1a commit c70ab06

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ide/nuvfile.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ tasks:
8686
cmds:
8787
- nuv activation poll
8888

89-
_info:
89+
info:
9090
silent: true
9191
#desc: info
9292
cmds:
@@ -109,8 +109,12 @@ tasks:
109109
fi
110110
fi
111111
- |
112+
PIP_FLAG="--user"
113+
if which python3 | grep $HOME
114+
then PIP_FLAG=""
115+
fi
112116
if ! python3 -m pip list | grep watchfiles >/dev/null 2>/dev/null
113-
then python3 -m pip install --user watchfiles asyncio
117+
then python3 -m pip install $PIP_FLAG watchfiles asyncio
114118
fi
115119
- |
116120
if ! which http-server >/dev/null 2>/dev/null

0 commit comments

Comments
 (0)