File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -216,12 +216,17 @@ if [[ \${_CW_IN_CONTAINER+defined} ]];then
216
216
else" >> _deploy/bin/$target
217
217
if [[ ${CONDA_CMD+defined} ]]; then
218
218
echo "
219
- if [[ ( -e \$ (/usr/bin/dirname \$ _O_SOURCE )/../pyvenv.cfg && ! \$ {CW_FORCE_CONDA_ACTIVATE+defined} ) || \$ {CW_NO_CONDA_ACTIVATE+defined} ]];then
219
+ _venvd=\$ (/usr/bin/dirname \$ _O_SOURCE )
220
+ test -e \$ _venvd/../pyvenv.cfg
221
+ _v_in_use=\$ ?
222
+ if [[ ( \$ _v_in_use -eq 0 && ! \$ {CW_FORCE_CONDA_ACTIVATE+defined} ) || \$ {CW_NO_CONDA_ACTIVATE+defined} ]];then
220
223
export PATH=\"\$ OLD_PATH\"
221
224
$_RUN_CMD $_default_cws exec -a \$ _O_SOURCE \$ DIR/$target $_cwe
222
225
else
223
226
export PATH=\"\$ OLD_PATH\"
224
- $_RUN_CMD $_cws exec -a \$ _O_SOURCE \$ DIR/$target $_cwe
227
+ _venv_act=\" :\"
228
+ test 0 -eq \$ _v_in_use && _venv_act=\" source \$ _venvd/activate\"
229
+ $_RUN_CMD $_cws \$ _venv_act && exec -a \$ _O_SOURCE \$ DIR/$target $_cwe
225
230
fi
226
231
fi
227
232
" >> _deploy/bin/$target
You can’t perform that action at this time.
0 commit comments