diff options
author | 2013-02-18 15:52:50 -0400 | |
---|---|---|
committer | 2013-02-18 15:52:50 -0400 | |
commit | 6af0317a8181fb17375e179f70494c910d888215 (patch) | |
tree | de7888c67b07154a174fabbfe4d159b9f73445d1 | |
parent | 0aa111cf19ad25d947e4cb8f743db8590064a24b (diff) |
avoid writing pre-commit hook if we cannot make it executable
-rw-r--r-- | Init.hs | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -76,10 +76,11 @@ gitPreCommitHookWrite = unlessBare $ do hook <- preCommitHook ifM (liftIO $ doesFileExist hook) ( warning $ "pre-commit hook (" ++ hook ++ ") already exists, not configuring" - , liftIO $ do - viaTmp writeFile hook preCommitScript - p <- getPermissions hook - setPermissions hook $ p {executable = True} + , unlessM crippledFileSystem $ + liftIO $ do + viaTmp writeFile hook preCommitScript + p <- getPermissions hook + setPermissions hook $ p {executable = True} ) gitPreCommitHookUnWrite :: Annex () |