fix hooks path
+ use fallback instead of catching error
This commit is contained in:
2
gitea.py
2
gitea.py
@@ -81,7 +81,7 @@ def change_to_gitea(doit, *repos):
|
||||
if write_when_new(doit, '.git/hooks/pre-commit', PRE_COMMIT_HOOK):
|
||||
dirty = True
|
||||
helper_script = parser.get('credential', 'helper', fallback=None)
|
||||
if helper_script != str(gitdir / hooks / 'get_gitea_token'):
|
||||
if helper_script != str('.git/hooks/get_gitea_token'):
|
||||
dirty = True
|
||||
if doit:
|
||||
os.system(f'git config credential.helper "{os.getcwd()}/.git/hooks/get_gitea_token"')
|
||||
|
||||
Reference in New Issue
Block a user