mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-01 08:48:19 +00:00
fix
This commit is contained in:
parent
80fdc20c8e
commit
f70c0d8354
@ -156,8 +156,10 @@ def get_conda_path():
|
||||
def environment_exists(env_name):
|
||||
from lollms.security import sanitize_shell_code
|
||||
env_name = sanitize_shell_code(env_name)
|
||||
env_name = Path(sys.executable).parent.parent / "miniconda3" / "env" / env_name
|
||||
conda_path = get_conda_path()
|
||||
ASCIIColors.yellow(f"Using conda from : {conda_path}")
|
||||
|
||||
result = subprocess.run(f'{conda_path} env list --json', shell=True, capture_output=True, text=True)
|
||||
envs_info = json.loads(result.stdout)
|
||||
env_names = [Path(env).name for env in envs_info['envs']]
|
||||
|
Loading…
x
Reference in New Issue
Block a user