diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-09-12 07:50:56 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-09-12 07:50:56 +0000 |
commit | 6fb2194d9cc2c9b52bc2006117d592283e00b7d6 (patch) | |
tree | 78ffb77d507de290dde8f41cddbd7b808f2d6dd8 /modules/launch_utils.py | |
parent | 59544321aa019d71d220b1da1eec703aa44fa8eb (diff) | |
download | stable-diffusion-webui-gfx803-6fb2194d9cc2c9b52bc2006117d592283e00b7d6.tar.gz stable-diffusion-webui-gfx803-6fb2194d9cc2c9b52bc2006117d592283e00b7d6.tar.bz2 stable-diffusion-webui-gfx803-6fb2194d9cc2c9b52bc2006117d592283e00b7d6.zip |
fetch version info when webui_dir is not work_dir
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r-- | modules/launch_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 6e54d063..8cdbafa5 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -64,7 +64,7 @@ Use --skip-python-version-check to suppress this warning. @lru_cache()
def commit_hash():
try:
- return subprocess.check_output([git, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip()
+ return subprocess.check_output([git, "-C", script_path, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip()
except Exception:
return "<none>"
@@ -72,7 +72,7 @@ def commit_hash(): @lru_cache()
def git_tag():
try:
- return subprocess.check_output([git, "describe", "--tags"], shell=False, encoding='utf8').strip()
+ return subprocess.check_output([git, "-C", script_path, "describe", "--tags"], shell=False, encoding='utf8').strip()
except Exception:
try:
|