Skip to content

Commit

Permalink
fetch version info when webui_dir is not work_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Sep 12, 2023
1 parent 5954432 commit 6fb2194
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/launch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def check_python_version():
@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>"


@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:

Expand Down

0 comments on commit 6fb2194

Please sign in to comment.