File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2+ from __future__ import print_function
3+
24import os
35import pkg_resources
46import stat
@@ -15,11 +17,15 @@ def install(runner):
1517 runner .pre_commit_path ,
1618 original_mode | stat .S_IXUSR | stat .S_IXGRP | stat .S_IXOTH ,
1719 )
20+
21+ print ('pre-commit installed at {0}' .format (runner .pre_commit_path ))
22+
1823 return 0
1924
2025
2126def uninstall (runner ):
2227 """Uninstall the pre-commit hooks."""
2328 if os .path .exists (runner .pre_commit_path ):
2429 os .remove (runner .pre_commit_path )
30+ print ('pre-commit uninstalled' )
2531 return 0
Original file line number Diff line number Diff line change @@ -127,13 +127,9 @@ def run(argv):
127127 runner = Runner .create ()
128128
129129 if args .command == 'install' :
130- retval = commands .install (runner )
131- print 'pre-commit installed at {0}' .format (runner .pre_commit_path )
132- return retval
130+ return commands .install (runner )
133131 elif args .command == 'uninstall' :
134- retval = commands .uninstall (runner )
135- print 'pre-commit uninstalled'
136- return retval
132+ return commands .uninstall (runner )
137133 elif args .command == 'run' :
138134 if args .hook :
139135 return run_single_hook (runner , args .hook , all_files = args .all_files )
You can’t perform that action at this time.
0 commit comments