aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-09-12 16:50:56 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-09-12 16:50:56 +0900
commit6fb2194d9cc2c9b52bc2006117d592283e00b7d6 (patch)
tree78ffb77d507de290dde8f41cddbd7b808f2d6dd8 /modules
parent59544321aa019d71d220b1da1eec703aa44fa8eb (diff)
fetch version info when webui_dir is not work_dir
Diffstat (limited to 'modules')
-rw-r--r--modules/launch_utils.py4
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: