Add import exception to Poetry import error message

Fixes #96
This commit is contained in:
2024-08-13 13:08:12 -04:00
committed by Ethan Paul
parent 57787c6206
commit f3ae242cf7
2 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ try:
from poetry.installation.operations.install import Install
from poetry.poetry import Poetry
from poetry.utils.env import VirtualEnv
except ImportError:
except ImportError as err:
raise exceptions.PoetryNotInstalledError(
f"No version of Poetry could be imported under the current environment for '{sys.executable}'"
f"Failed to import a supported version of Poetry under the current environment '{sys.executable}': {err}"
) from None