mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Tests pass on windows
This commit is contained in:
parent
56e5c4eb2d
commit
143ed94500
21 changed files with 224 additions and 109 deletions
|
|
@ -8,13 +8,16 @@ from pre_commit import five
|
|||
|
||||
|
||||
# TODO: smell: import side-effects
|
||||
COLS = int(
|
||||
subprocess.Popen(
|
||||
['tput', 'cols'], stdout=subprocess.PIPE,
|
||||
).communicate()[0] or
|
||||
# Default in the case of no terminal
|
||||
80
|
||||
)
|
||||
try:
|
||||
COLS = int(
|
||||
subprocess.Popen(
|
||||
['tput', 'cols'], stdout=subprocess.PIPE,
|
||||
).communicate()[0] or
|
||||
# Default in the case of no terminal
|
||||
80
|
||||
)
|
||||
except OSError: # pragma: no cover (windows)
|
||||
COLS = 80
|
||||
|
||||
|
||||
def get_hook_message(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue