Repository navigation
fix(install): gate update on .git checkout and self-heal non-git dir - #100
Merged
Merged
Conversation
install.sh gated its update path on directory existence (`[ -d "$INSTALL_DIR" ]`) rather than on the directory being a git checkout. When ~/.local/share/budjira existed but had no .git (an interrupted or corrupted earlier install), the update branch ran `git fetch` in a non-repo and aborted with "not a git repository", so `budjira update` failed. Gate on `$INSTALL_DIR/.git` instead, and heal a non-git directory by removing it and re-cloning. The valid-checkout update path and the fresh-clone path are unchanged. Closes #98
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
budjira updatefailed withfatal: not a git repository (or any of the parent directories): .git.install.shgated its update path on directory existence(
[ -d "$INSTALL_DIR" ]), not on the directory being a git checkout. When~/.local/share/budjiraexisted but had no.git(interrupted or corruptedearlier install), the update branch ran
git fetchin a non-repo and aborted.Fix
$INSTALL_DIR/.gitinstead of$INSTALL_DIR.Verification
Branch-selection tested with a stubbed
gitfor all three states:rm -rf+ clone.gitpresent.gitpresentsh -n install.shclean.No release needed
install.shis fetched live frommasterat update time (hardcoded URL inbudjira/utils/version.py:174) and is not part of the installed package. The fixtakes effect for every
budjira updateas soon as it lands onmaster— noversion bump.
Workaround until merged
Closes #98
Related: #99 (update ignores install method — separate, broader issue)