|
@@ -20,6 +20,7 @@
|
|
|
|
|
|
import os
|
|
|
import subprocess
|
|
|
+import sys
|
|
|
import tempfile
|
|
|
|
|
|
from dulwich.errors import (
|
|
@@ -71,6 +72,11 @@ class ShellHook(Hook):
|
|
|
self.pre_exec_callback = pre_exec_callback
|
|
|
self.post_exec_callback = post_exec_callback
|
|
|
|
|
|
+ if sys.version_info[0] == 2 and sys.platform == 'win32':
|
|
|
+ # Python 2 on windows does not support unicode file paths
|
|
|
+ # http://bugs.python.org/issue1759845
|
|
|
+ self.filepath = self.filepath.encode(sys.getfilesystemencoding())
|
|
|
+
|
|
|
def execute(self, *args):
|
|
|
"""Execute the hook with given args"""
|
|
|
|