fix "unrecognized arguments: --yes" bug on unattended upgrade

This commit is contained in:
Lincoln Stein 2023-07-30 11:07:06 -04:00
parent 03594c949a
commit 83d3f2347e
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import warnings
from dataclasses import dataclass, field
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import List, Dict, Callable, Union, Set
from typing import List, Dict, Callable, Union, Set, Optional
import requests
from diffusers import DiffusionPipeline
@ -400,7 +400,7 @@ class ModelInstall(object):
attributes.update(dict(config=str(legacy_conf)))
return attributes
def relative_to_root(self, path: Path, root: None) -> Path:
def relative_to_root(self, path: Path, root: Optional[Path] = None) -> Path:
root = root or self.config.root_path
if path.is_relative_to(root):
return path.relative_to(root)

View File

@ -650,7 +650,7 @@ def process_and_execute(
):
# need to reinitialize config in subprocess
config = InvokeAIAppConfig.get_config()
config.parse_args()
config.parse_args(['--root',opt.root])
# set up so that stderr is sent to conn_out
if conn_out:

View File

@ -1 +1 @@
__version__ = "3.0.1post1"
__version__ = "3.0.1post2"