-
-
Notifications
You must be signed in to change notification settings - Fork 889
Closed
Description
search tried in the issue tracker
solaris
describe your issue
After using pre-commit on my local workstation for some time, I installed (using pip) on my SmartOS system (Solaris derivative). Install went fine, and execution without changed files (pre-commit run
) executed without problems.
As soon as I have a file to commit, or I run pre-commit run -a
, pre-commit fails with:
termios.error: (22, 'Invalid argument')
The backtrace is:
Traceback (most recent call last):
File "/opt/local/lib/python3.9/site-packages/pre_commit/error_handler.py", line 73, in error_handler
yield
File "/opt/local/lib/python3.9/site-packages/pre_commit/main.py", line 389, in main
return run(args.config, store, args)
File "/opt/local/lib/python3.9/site-packages/pre_commit/commands/run.py", line 416, in run
return _run_hooks(config, hooks, skips, args)
File "/opt/local/lib/python3.9/site-packages/pre_commit/commands/run.py", line 285, in _run_hooks
current_retval, prior_diff = _run_single_hook(
File "/opt/local/lib/python3.9/site-packages/pre_commit/commands/run.py", line 192, in _run_single_hook
retcode, out = language.run_hook(hook, filenames, use_color)
File "/opt/local/lib/python3.9/site-packages/pre_commit/languages/python.py", line 230, in run_hook
return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
File "/opt/local/lib/python3.9/site-packages/pre_commit/languages/helpers.py", line 137, in run_xargs
return xargs(cmd, file_args, **kwargs)
File "/opt/local/lib/python3.9/site-packages/pre_commit/xargs.py", line 164, in xargs
for proc_retcode, proc_out, _ in results:
File "/opt/local/lib/python3.9/concurrent/futures/_base.py", line 609, in result_iterator
yield fs.pop().result()
File "/opt/local/lib/python3.9/concurrent/futures/_base.py", line 446, in result
return self.__get_result()
File "/opt/local/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/opt/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/local/lib/python3.9/site-packages/pre_commit/xargs.py", line 156, in run_cmd_partition
return cmd_fn(
File "/opt/local/lib/python3.9/site-packages/pre_commit/util.py", line 211, in cmd_output_p
with open(os.devnull) as devnull, Pty() as pty:
File "/opt/local/lib/python3.9/site-packages/pre_commit/util.py", line 171, in __enter__
attrs = termios.tcgetattr(self.r)
pre-commit --version
pre-commit 2.19.0
.pre-commit-config.yaml
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^group_vars/|^host_vars
- id: check-added-large-files
- id: check-json
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14 # Use the ref you want to point at
hooks:
- id: mdformat
# optional
additional_dependencies:
- mdformat-tables
- mdformat-black
- repo: https://github.com/ansible-community/ansible-lint
rev: v6.0.2 # Use the ref you want to point at
hooks:
- id: ansible-lint
~/.cache/pre-commit/pre-commit.log (if present)
version information
pre-commit version: 2.19.0
git --version: git version 2.36.0
sys.version:
3.9.12 (main, May 9 2022, 22:49:33)
[GCC 10.3.0]
sys.executable: /opt/local/bin/python3.9
os.name: posix
sys.platform: sunos5
error information
An unexpected error has occurred: error: (22, 'Invalid argument')
Traceback (most recent call last):
File "/opt/local/lib/python3.9/site-packages/pre_commit/error_handler.py", line 73, in error_handler
yield
File "/opt/local/lib/python3.9/site-packages/pre_commit/main.py", line 389, in main
return run(args.config, store, args)
File "/opt/local/lib/python3.9/site-packages/pre_commit/commands/run.py", line 416, in run
return _run_hooks(config, hooks, skips, args)
File "/opt/local/lib/python3.9/site-packages/pre_commit/commands/run.py", line 285, in _run_hooks
current_retval, prior_diff = _run_single_hook(
File "/opt/local/lib/python3.9/site-packages/pre_commit/commands/run.py", line 192, in _run_single_hook
retcode, out = language.run_hook(hook, filenames, use_color)
File "/opt/local/lib/python3.9/site-packages/pre_commit/languages/python.py", line 230, in run_hook
return helpers.run_xargs(hook, hook.cmd, file_args, color=color)
File "/opt/local/lib/python3.9/site-packages/pre_commit/languages/helpers.py", line 137, in run_xargs
return xargs(cmd, file_args, **kwargs)
File "/opt/local/lib/python3.9/site-packages/pre_commit/xargs.py", line 164, in xargs
for proc_retcode, proc_out, _ in results:
File "/opt/local/lib/python3.9/concurrent/futures/_base.py", line 609, in result_iterator
yield fs.pop().result()
File "/opt/local/lib/python3.9/concurrent/futures/_base.py", line 446, in result
return self.__get_result()
File "/opt/local/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/opt/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/local/lib/python3.9/site-packages/pre_commit/xargs.py", line 156, in run_cmd_partition
return cmd_fn(
File "/opt/local/lib/python3.9/site-packages/pre_commit/util.py", line 211, in cmd_output_p
with open(os.devnull) as devnull, Pty() as pty:
File "/opt/local/lib/python3.9/site-packages/pre_commit/util.py", line 171, in __enter__
attrs = termios.tcgetattr(self.r)
termios.error: (22, 'Invalid argument')
Metadata
Metadata
Assignees
Labels
No labels