Improve trying to find conda executable

This commit is contained in:
allegroai 2020-11-11 16:29:50 +02:00
parent 92efea6b76
commit a61265effe

View File

@ -92,8 +92,9 @@ class CondaAPI(PackageManager):
) )
try: try:
self.conda = ( self.conda = (
find_executable("conda") find_executable("conda") or
or Argv(select_for_platform(windows="where", linux="which"), "conda").get_output(shell=True).strip() Argv(select_for_platform(windows="where", linux="which"), "conda").get_output(
shell=select_for_platform(windows=True, linux=False)).strip()
) )
except Exception: except Exception:
raise ValueError("ERROR: package manager \"conda\" selected, " raise ValueError("ERROR: package manager \"conda\" selected, "