From 56d4ad04a89026a296f2f11af08f070e546604a3 Mon Sep 17 00:00:00 2001 From: charlesaurav13 Date: Sat, 20 Jun 2026 03:12:38 +0530 Subject: [PATCH] fix: replace hardcoded developer git path with dynamic repo root Fixes #111. The upgrade flow contained a hardcoded path to the original developer's local machine (/home/user/sandbox/buskill-app/.git) which fails on every other system with 'fatal: not a git repository'. Replace it with a path derived dynamically from __file__: since buskill/__init__.py lives at src/packages/buskill/__init__.py, the repo root is always 3 directories up. Use 'git -C ' so the command works regardless of the current working directory. Signed-off-by: charlesaurav13 --- src/packages/buskill/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/packages/buskill/__init__.py b/src/packages/buskill/__init__.py index 810385728..b9264d0b8 100644 --- a/src/packages/buskill/__init__.py +++ b/src/packages/buskill/__init__.py @@ -1992,9 +1992,14 @@ def upgrade(self): # the only reason the SOURCE_DATE_EPOCH would be missing is if we're executing # the python files directly (eg we're testing) and we can just get it from git if BUSKILL_VERSION['SOURCE_DATE_EPOCH'] == '': + # derive the repo root dynamically: buskill/__init__.py lives at + # /src/packages/buskill/__init__.py, so go up 4 levels + repo_root = os.path.abspath( + os.path.join( os.path.dirname(__file__), '..', '..', '..' ) + ) result = subprocess.run( [ 'git', - '--git-dir=/home/user/sandbox/buskill-app/.git', + '-C', repo_root, 'log', '-1', '--pretty=%ct'