Fix check for running inside venv (#8481)
* Import and use the function from pip instead of defining it ourselves. * Fix tests.
This commit is contained in:
1 parent
6ca828fd14
commit
543e8bb62e
5 files changed
+36
-24
No files matched your search
@@ -77,7 +77,7 @@ def _async_process_requirements(hass: core.HomeAssistant, name: str,
|
||||
|
||||
def pip_install(mod):
|
||||
"""Install packages."""
|
||||
if pkg_util.is_virtual_env():
|
||||
if pkg_util.running_under_virtualenv():
|
||||
return pkg_util.install_package(
|
||||
mod, constraints=os.path.join(
|
||||
os.path.dirname(__file__), CONSTRAINT_FILE))
|
||||
|
||||
Reference in new issue
Block a user