Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy executables by default on windows. #6506

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -7,6 +7,7 @@
* Add solver optimization to skip a version of a package if it does not resolve
any conflicts encountered in the last version, controlled by flag
'--fine-grained-conflicts'. (#5918)
* On windows use copy as the default install method for executables

3.0.0.0 Mikhail Glushenkov <mikhail.glushenkov@gmail.com> August 2019
* Parse comma-separated lists for extra-prog-path, extra-lib-dirs, extra-framework-dirs,
Expand Down