fix: replace hardcoded developer git path with dynamic repo root (fixes #111)#136
Open
charlesaurav13 wants to merge 1 commit into
Open
fix: replace hardcoded developer git path with dynamic repo root (fixes #111)#136charlesaurav13 wants to merge 1 commit into
charlesaurav13 wants to merge 1 commit into
Conversation
Fixes BusKill#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 <repo_root>' so the command works regardless of the current working directory. Signed-off-by: charlesaurav13 <sauravp1236@gmail.com>
|
INFO: No unicode characters found in PR's commits (source) |
Member
|
Thanks for the PR :) Please note that this repo does not accept contributions that use AI Can you please tell us if you wrote this code, comments, and PR contents entirely by yourself? Or if you used AI for any part of it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The upgrade flow contained a hardcoded path to the original developer's local machine:
'--git-dir=/home/user/sandbox/buskill-app/.git'This caused
fatal: not a git repositoryon every system other than the developer's, crashing the upgrade flow wheneverSOURCE_DATE_EPOCHwas not set (i.e. in development / testing builds).Changes
Replace the hardcoded path with one derived dynamically from
__file__:buskill/__init__.pylives atsrc/packages/buskill/__init__.py, so 3 directories up is always the repo root. Usinggit -Crather than--git-dirmeans it works regardless of the current working directory.Test plan
SOURCE_DATE_EPOCH) — no longer crashes withfatal: not a git repositorySOURCE_DATE_EPOCHis correctly populated fromgit logoutputCloses #111