Skip to content

Commit

Permalink
Copy executables by default on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasPK authored and phadej committed Jan 31, 2020
1 parent 6e9d6bd commit 7bae16f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cabal-install/Distribution/Client/CmdInstall.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ import System.Directory
, removeFile, removeDirectory, copyFile )
import System.FilePath
( (</>), (<.>), takeDirectory, takeBaseName )
import System.Info
( os )


installCommand :: CommandUI ( ConfigFlags, ConfigExFlags, InstallFlags
Expand Down Expand Up @@ -668,7 +670,12 @@ installExes verbosity baseCtx buildCtx platform compiler
where
overwritePolicy = fromFlagOrDefault NeverOverwrite $
cinstOverwritePolicy clientInstallFlags
installMethod = fromFlagOrDefault InstallMethodSymlink $
isWindows = System.Info.os == "mingw32"
defaultMethod
-- Copy since windows doesn't support symlinks by default
| isWindows = InstallMethodCopy
| otherwise = InstallMethodSymlink
installMethod = fromFlagOrDefault defaultMethod $
cinstInstallMethod clientInstallFlags

-- | Install any built library by adding it to the default ghc environment
Expand Down
1 change: 1 addition & 0 deletions cabal-install/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* Use `hackage-security-0.6`
([#6388](https://github.com/haskell/cabal/pull/6388))
* Other dependency upgrades
* On windows use copy as the default install method for executables

3.0.0.0 Mikhail Glushenkov <[email protected]> August 2019
* `v2-haddock` fails on `haddock` failures (#5977)
Expand Down

0 comments on commit 7bae16f

Please sign in to comment.