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

View File

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