From 9f0cfed6005f98d59a4e8d18972e3c1c756aafd3 Mon Sep 17 00:00:00 2001 From: Artem Polishchuk Date: Sat, 30 Mar 2019 19:56:52 +0200 Subject: [PATCH] Specify env python explicitly. --- pre_commit/commands/install_uninstall.py | 2 +- pre_commit/resources/hook-tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py index 7e33961c..5f9f5c39 100644 --- a/pre_commit/commands/install_uninstall.py +++ b/pre_commit/commands/install_uninstall.py @@ -107,7 +107,7 @@ def install( before, rest = contents.split(TEMPLATE_START) to_template, after = rest.split(TEMPLATE_END) - before = before.replace('#!/usr/bin/env python', shebang()) + before = before.replace('#!/usr/bin/env python3', shebang()) hook_file.write(before + TEMPLATE_START) for line in to_template.splitlines(): diff --git a/pre_commit/resources/hook-tmpl b/pre_commit/resources/hook-tmpl index f455ca35..0b516181 100755 --- a/pre_commit/resources/hook-tmpl +++ b/pre_commit/resources/hook-tmpl @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """File generated by pre-commit: https://pre-commit.com""" from __future__ import print_function