fix(installer): bubble up exceptions during install

This commit is contained in:
Eugene Brodsky 2024-02-02 20:53:18 -05:00 committed by Kent Keirsey
parent 1c8fc908b2
commit ca2bb6f0cc

View File

@ -215,12 +215,12 @@ class InvokeAiInstance:
src = f"invokeai=={version}" if version is not None else "invokeai"
from plumbum import FG, local # type: ignore
from plumbum import FG, ProcessExecutionError, local # type: ignore
pip = local[self.pip]
_ = pip["install", "--upgrade", "pip"] & FG
_ = (
pip[
pipeline = pip[
"install",
"--require-virtualenv",
"--force-reinstall",
@ -232,8 +232,15 @@ class InvokeAiInstance:
extra_index_url,
pre,
]
& FG
try:
_ = pipeline & FG
except ProcessExecutionError as e:
print(f"Error: {e}")
print(
"Could not install InvokeAI. Please try downloading the latest version of the installer and install again."
)
sys.exit(1)
def configure(self):
"""