pre-commit: Not working from SmartGit

I know that this issue may not be caused by pre-commit directly, but figured out you guys could help me. Trying to commit directly from SmartGit prints this:

~/Development/ProjectName> git add --force -- Libraries/IOUtilities/NSString+IOUtilities.m
~/Development/ProjectName> git commit --file=/var/folders/yj/l8y5kytd4tggcv7grrnpznh80000gn/T/smartgit-2497340677383657620tmp/commit-4165014595931887528.tmp -o -- Libraries/IOUtilities/NSString+IOUtilities.m
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
An unexpected error has occurred: CalledProcessError: Command: ('/Applications/SmartGit.app/Contents/Resources/git/libexec/git-core/git', 'submodule', 'update', '--init', '--recursive')
Return code: 1
Expected return code: 0
Output: (none)
Errors: 
    /Applications/SmartGit.app/Contents/Resources/git/libexec/git-core/git-sh-setup: line 46: /usr/local/git/libexec/git-core/git-sh-i18n: No such file or directory
    
Check the log at /Users/revolt/.cache/pre-commit/pre-commit.log

and cat /Users/revolt/.cache/pre-commit/pre-commit.log:

An unexpected error has occurred: CalledProcessError: Command: ('/Applications/SmartGit.app/Contents/Resources/git/libexec/git-core/git', 'submodule', 'update', '--init', '--recursive')
Return code: 1
Expected return code: 0
Output: (none)
Errors: 
    /Applications/SmartGit.app/Contents/Resources/git/libexec/git-core/git-sh-setup: line 46: /usr/local/git/libexec/git-core/git-sh-i18n: No such file or directory
    

Traceback (most recent call last):
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/error_handler.py", line 47, in error_handler
    yield
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/main.py", line 259, in main
    return run(runner, args)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/commands/run.py", line 244, in run
    for _, hook in repo.hooks:
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/cached_property.py", line 26, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/repository.py", line 173, in hooks
    if hook['id'] not in self.manifest_hooks:
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/cached_property.py", line 26, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/repository.py", line 167, in manifest_hooks
    manifest_path = os.path.join(self._repo_path, C.MANIFEST_FILE)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/cached_property.py", line 26, in __get__
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/repository.py", line 155, in _repo_path
    self.repo_config['repo'], self.repo_config['sha'],
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/store.py", line 154, in clone
    return self._new_repo(repo, ref, clone_strategy)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/store.py", line 130, in _new_repo
    make_strategy(directory)
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/store.py", line 151, in clone_strategy
    env=no_git_env(),
  File "/usr/local/Cellar/pre-commit/1.4.1/libexec/lib/python3.6/site-packages/pre_commit/util.py", line 187, in cmd_output
    returncode, cmd, retcode, output=(stdout, stderr),
pre_commit.util.CalledProcessError: Command: ('/Applications/SmartGit.app/Contents/Resources/git/libexec/git-core/git', 'submodule', 'update', '--init', '--recursive')
Return code: 1
Expected return code: 0
Output: (none)
Errors: 
    /Applications/SmartGit.app/Contents/Resources/git/libexec/git-core/git-sh-setup: line 46: /usr/local/git/libexec/git-core/git-sh-i18n: No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 50 (41 by maintainers)

Most upvoted comments

For the libexec-dynload issue, I believe that to be a problem with how brew is set up – I’ve opened an issue with some detailed analysis here: https://github.com/Homebrew/homebrew-core/issues/21386