##// END OF EJS Templates
hooks: use /usr/bin/env only when needed...
Thomas De Schampheleire -
r7537:dd88fd3a stable
parent child Browse files
Show More
@@ -729,7 +729,7 b' class ScmModel(object):'
729 """
729 """
730 # FIXME This may not work on Windows and may need a shell wrapper script.
730 # FIXME This may not work on Windows and may need a shell wrapper script.
731 return (sys.executable
731 return (sys.executable
732 or 'python2')
732 or '/usr/bin/env python2')
733
733
734 def install_git_hooks(self, repo, force_create=False):
734 def install_git_hooks(self, repo, force_create=False):
735 """
735 """
@@ -745,11 +745,11 b' class ScmModel(object):'
745 if not os.path.isdir(loc):
745 if not os.path.isdir(loc):
746 os.makedirs(loc)
746 os.makedirs(loc)
747
747
748 tmpl_post = "#!/usr/bin/env %s\n" % self._get_git_hook_interpreter()
748 tmpl_post = "#!%s\n" % self._get_git_hook_interpreter()
749 tmpl_post += pkg_resources.resource_string(
749 tmpl_post += pkg_resources.resource_string(
750 'kallithea', os.path.join('config', 'post_receive_tmpl.py')
750 'kallithea', os.path.join('config', 'post_receive_tmpl.py')
751 )
751 )
752 tmpl_pre = "#!/usr/bin/env %s\n" % self._get_git_hook_interpreter()
752 tmpl_pre = "#!%s\n" % self._get_git_hook_interpreter()
753 tmpl_pre += pkg_resources.resource_string(
753 tmpl_pre += pkg_resources.resource_string(
754 'kallithea', os.path.join('config', 'pre_receive_tmpl.py')
754 'kallithea', os.path.join('config', 'pre_receive_tmpl.py')
755 )
755 )
General Comments 0
You need to be logged in to leave comments. Login now