Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding assignments fails if gitconfig can't be found or written to #18

Open
lockejan opened this issue Mar 17, 2022 · 1 comment
Open

Comments

@lockejan
Copy link
Contributor

lockejan commented Mar 17, 2022

Bug Report

git-team version: 1.7.0
go version: 1.17.7

failure description

Invoking git team assignments add noujz "Mr. Noujz <[email protected]>" exits with error: exit status 255 if no $HOME/.gitconfig is present.
This also happens if the file is read-only.

Background:
It's possible to store gitconfig under $XDG_HOME, e.g. $HOME/.config/git/config
Git checks a set of paths for configurations on every invocation.

expected behaviour description

Creation of $HOME/.gitignore or another distinct file for git-team.
Alternatively or additionally a graceful exit with an explanation error message or offering to create a .gitconfig.

Note: Some approaches like home-manager favours immutable configuration, meaning that wherever gitconfig is put it is read-only by default. That's not always a given and it's possible to make them writeable as well.

PS:This also happens for other git-team cmd's that rely on the existence of the file like git-team disable.

hekmekk added a commit that referenced this issue Jun 11, 2023
Whenever an unknown gitconfig error occurs, the user will now see:
- the respective 'git config' command itself
- the entire output of the 'git config' command

fixes issue 18, see: #18
@hekmekk
Copy link
Owner

hekmekk commented Jun 11, 2023

Finally had some spare time to implement a "fix" with revision 74119e2.

Decided for printing more helpful error messages for the time being as it feels right to me that git-team as a git sub command makes use of the git config command for configuration and useful error messages have definitely been missing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants