mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Don't UnicodeDecodeError on non-ascii not-found hooks. Resolves #207.
This commit is contained in:
parent
20c546a7da
commit
7905594215
5 changed files with 35 additions and 12 deletions
|
|
@ -7,6 +7,7 @@ import sys
|
|||
import pkg_resources
|
||||
|
||||
from pre_commit import color
|
||||
from pre_commit import five
|
||||
from pre_commit.commands.autoupdate import autoupdate
|
||||
from pre_commit.commands.clean import clean
|
||||
from pre_commit.commands.install_uninstall import install
|
||||
|
|
@ -25,6 +26,7 @@ os.environ.pop('__PYVENV_LAUNCHER__', None)
|
|||
|
||||
def main(argv=None):
|
||||
argv = argv if argv is not None else sys.argv[1:]
|
||||
argv = [five.to_text(arg) for arg in argv]
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# http://stackoverflow.com/a/8521644/812183
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue