mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Use virtualenv python from install-time for less virtualenv requirements at commit time.
This commit is contained in:
parent
bba24b6535
commit
598e54640b
4 changed files with 57 additions and 15 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
|
@ -10,7 +11,7 @@ from pre_commit import five
|
|||
# TODO: smell: import side-effects
|
||||
COLS = int(
|
||||
subprocess.Popen(
|
||||
['tput', 'cols'], stdout=subprocess.PIPE
|
||||
['tput', 'cols'], stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'),
|
||||
).communicate()[0] or
|
||||
# Default in the case of no terminal
|
||||
80
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue