Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save paul-english/94bce97cbbebf5e9e73d634021ad2eb1 to your computer and use it in GitHub Desktop.
Save paul-english/94bce97cbbebf5e9e73d634021ad2eb1 to your computer and use it in GitHub Desktop.
### version information
```
pre-commit version: 2.18.1
git --version: git version 2.32.0 (Apple Git-132)
sys.version:
3.9.7 (default, Sep 16 2021, 08:50:36)
[Clang 10.0.0 ]
sys.executable: /Users//opt/anaconda3/bin/python
os.name: posix
sys.platform: darwin
```
### error information
```
An unexpected error has occurred: CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', '/Users//.cache/pre-commit/patch1654494318-43901')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: patch failed: .rs:1
error: .rs: patch does not apply
error: patch failed: .rs:1
error: .rs: patch does not apply
```
```
Traceback (most recent call last):
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 28, in _git_apply
cmd_output_b('git', *args)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/util.py", line 146, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', 'apply', '--whitespace=nowarn', '/Users//.cache/pre-commit/patch1654494318-43901')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: patch failed: .rs:1
error: .rs: patch does not apply
error: patch failed: .rs:1
error: .rs: patch does not apply
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 76, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 31, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/util.py", line 146, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', '/Users//.cache/pre-commit/patch1654494318-43901')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: patch failed: .rs:1
error: .rs: patch does not apply
error: patch failed: .rs:1
error: .rs: patch does not apply
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 28, in _git_apply
cmd_output_b('git', *args)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/util.py", line 146, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', 'apply', '--whitespace=nowarn', '/Users//.cache/pre-commit/patch1654494318-43901')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: patch failed: .rs:1
error: .rs: patch does not apply
error: patch failed: .rs:1
error: .rs: patch does not apply
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/error_handler.py", line 73, in error_handler
yield
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/main.py", line 343, in main
return hook_impl(
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/commands/hook_impl.py", line 237, in hook_impl
return retv | run(config, store, ns)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/commands/run.py", line 416, in run
return _run_hooks(config, hooks, skips, args)
File "/Users//opt/anaconda3/lib/python3.9/contextlib.py", line 532, in __exit__
raise exc_details[1]
File "/Users//opt/anaconda3/lib/python3.9/contextlib.py", line 517, in __exit__
if cb(*exc_details):
File "/Users//opt/anaconda3/lib/python3.9/contextlib.py", line 126, in __exit__
next(self.gen)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 101, in staged_files_only
yield
File "/Users//opt/anaconda3/lib/python3.9/contextlib.py", line 126, in __exit__
next(self.gen)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 86, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/staged_files_only.py", line 31, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "/Users//opt/anaconda3/lib/python3.9/site-packages/pre_commit/util.py", line 146, in cmd_output_b
raise CalledProcessError(returncode, cmd, retcode, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/Library/Developer/CommandLineTools/usr/libexec/git-core/git', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', '/Users//.cache/pre-commit/patch1654494318-43901')
return code: 1
expected return code: 0
stdout: (none)
stderr:
error: patch failed: .rs:1
error: .rs: patch does not apply
error: patch failed: .rs:1
error: .rs: patch does not apply
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment