Make sure cabal is executable wrt #46

This commit is contained in:
Julian Ospald 2020-08-14 22:07:39 +02:00
parent 4280d7109a
commit d9c864d3c5
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 11 additions and 1 deletions

View File

@ -275,10 +275,20 @@ installCabalBindist dlinfo ver (PlatformRequest {..}) = do
let cabalFile = [rel|cabal|]
liftIO $ createDirRecursive newDirPerms inst
destFileName <- lift $ parseRel (toFilePath cabalFile <> "-" <> verToBS ver)
let destPath = inst </> destFileName
handleIO (throwE . CopyError . show) $ liftIO $ copyFile
(path </> cabalFile)
(inst </> destFileName)
(destPath)
Overwrite
liftIO $ setFileMode
(toFilePath destPath)
( newFilePerms
`unionFileModes` ownerExecuteMode
`unionFileModes` groupExecuteMode
`unionFileModes` otherExecuteMode
)
-- | Installs cabal into @~\/.ghcup\/bin/cabal-\<ver\>@ and