fix: ensure the correct path when logging out version
This commit is contained in:
parent
7ab0674d8a
commit
d9f83dadd1
@ -48,6 +48,10 @@ sys.stdout = StreamToLogger(logging.INFO)
|
|||||||
sys.stderr = StreamToLogger(logging.ERROR)
|
sys.stderr = StreamToLogger(logging.ERROR)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Get the absolute path of the script's directory
|
||||||
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
# Change the current working directory to the script's directory
|
||||||
|
os.chdir(script_dir)
|
||||||
current_git_commit = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()
|
current_git_commit = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8').strip()
|
||||||
print(f"** Comfy Deploy Revision: {current_git_commit}")
|
print(f"** Comfy Deploy Revision: {current_git_commit}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user