From 34fd89683e736f523db4a61dd7b02e02b0e30b2d Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 18 May 2022 15:29:02 +0200 Subject: [PATCH] Fix windows install hook Closes https://github.com/iterative/dvc/issues/7700 --- scmrepo/git/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scmrepo/git/__init__.py b/scmrepo/git/__init__.py index ec9baccc..d3b7ebbb 100644 --- a/scmrepo/git/__init__.py +++ b/scmrepo/git/__init__.py @@ -242,7 +242,7 @@ def install_hook( self.hooks_dir.mkdir(exist_ok=True) hook = self.hooks_dir / name - directive = f"#!{shutil.which(interpreter)}" + directive = f"#!{shutil.which(interpreter) or '/bin/sh' }" hook.write_text(f"{directive}\n{script}\n", encoding="utf-8") hook.chmod(0o777)