Skip to content

Commit 857e9dc

Browse files
committed
bug fix when git is not installed
1 parent 907c3ff commit 857e9dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tilelang/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def get_git_commit_id() -> Union[str, None]:
3232
cwd=os.path.dirname(os.path.abspath(__file__)),
3333
stderr=subprocess.DEVNULL,
3434
encoding='utf-8').strip()
35-
except subprocess.SubprocessError:
35+
# FileNotFoundError is raised when git is not installed
36+
except (subprocess.SubprocessError, FileNotFoundError):
3637
return None
3738

3839

0 commit comments

Comments
 (0)