generalized safeWriteFile to viaTmp
This commit is contained in:
parent
d72fb5acc2
commit
2cda9d0a0f
4 changed files with 9 additions and 8 deletions
|
@ -55,7 +55,7 @@ gitPreCommitHookWrite repo = do
|
|||
if exists
|
||||
then warning $ "pre-commit hook (" ++ hook ++ ") already exists, not configuring"
|
||||
else liftIO $ do
|
||||
safeWriteFile hook preCommitScript
|
||||
viaTmp writeFile hook preCommitScript
|
||||
p <- getPermissions hook
|
||||
setPermissions hook $ p {executable = True}
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue