mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-06 18:40:49 -08:00
git status
This commit is contained in:
parent
11f827c58b
commit
27947a79d6
2 changed files with 13 additions and 6 deletions
|
|
@ -85,6 +85,14 @@ def git_tag():
|
|||
return "<none>"
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def git_status():
|
||||
try:
|
||||
return subprocess.check_output([git, "-C", script_path, "status"], shell=False, encoding='utf8').strip()
|
||||
except Exception as e:
|
||||
return str(e)
|
||||
|
||||
|
||||
def run(command, desc=None, errdesc=None, custom_env=None, live: bool = default_command_live) -> str:
|
||||
if desc is not None:
|
||||
print(desc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue