Skip to content

Commit 7c49c9f

Browse files
committed
Default tput cols to 80.
1 parent 720db97 commit 7c49c9f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pre_commit/output.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
# TODO: smell: import side-effects
99
COLS = int(
10-
subprocess.Popen(['tput', 'cols'], stdout=subprocess.PIPE).communicate()[0]
10+
subprocess.Popen(
11+
['tput', 'cols'], stdout=subprocess.PIPE
12+
).communicate()[0] or
13+
# Default in the case of no terminal
14+
80
1115
)
1216

1317

0 commit comments

Comments
 (0)