mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Default tput cols to 80.
This commit is contained in:
parent
720db97c13
commit
7c49c9f7d9
1 changed files with 5 additions and 1 deletions
|
|
@ -7,7 +7,11 @@ from pre_commit import color
|
|||
|
||||
# TODO: smell: import side-effects
|
||||
COLS = int(
|
||||
subprocess.Popen(['tput', 'cols'], stdout=subprocess.PIPE).communicate()[0]
|
||||
subprocess.Popen(
|
||||
['tput', 'cols'], stdout=subprocess.PIPE
|
||||
).communicate()[0] or
|
||||
# Default in the case of no terminal
|
||||
80
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue