I'd say you just need to prepend 'call' to your activate.bat invocation, to ensure that the current batch file is resumed after activate is executed:
call %~dp0envScriptsactivate.bat
Consider doing the same for deactivate.bat
. Furthermore, if you want to ensure that the current cmd.exe environment is not polluted by a call to your batch file, consider wrapping your commands in a setlocal
/endlocal
command pair.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…