mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-02-10 21:44:48 -05:00
handle missing follow_symlinks on windows
This commit is contained in:
parent
74662373cb
commit
cf725bee8c
@ -104,7 +104,10 @@ class GitHooks(Command):
|
||||
os.remove(path) # remove if symlink
|
||||
with open(path, 'wb') as f:
|
||||
f.write(script.encode('utf-8'))
|
||||
os.chmod(path, 0o744, follow_symlinks=False)
|
||||
try:
|
||||
os.chmod(path, 0o744, follow_symlinks=False)
|
||||
except TypeError:
|
||||
os.chmod(path, 0o744)
|
||||
|
||||
def uninstall(self):
|
||||
self.info('Uninstalling the hooks:', ', '.join(self.names))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user