Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
6882787d
Commit
6882787d
authored
Mar 14, 2020
by
Lautaro Martin Emanuel
Committed by
Oleg Grenrus
Mar 16, 2020
Browse files
Installing (copy or symlink) executable message prints destination.
parent
3d93cdd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/CmdInstall.hs
View file @
6882787d
...
...
@@ -835,24 +835,26 @@ installBuiltExe
installBuiltExe
verbosity
overwritePolicy
sourceDir
exeName
finalExeName
installdir
InstallMethodSymlink
=
do
notice
verbosity
$
"Symlinking '"
<>
exeName
<>
"'"
notice
verbosity
$
"Symlinking '"
<>
exeName
<>
"' to '"
<>
destination
<>
"'"
symlinkBinary
overwritePolicy
installdir
sourceDir
finalExeName
exeName
where
destination
=
installdir
</>
finalExeName
installBuiltExe
verbosity
overwritePolicy
sourceDir
exeName
finalExeName
installdir
InstallMethodCopy
=
do
notice
verbosity
$
"Copying '"
<>
exeName
<>
"'"
notice
verbosity
$
"Copying '"
<>
exeName
<>
"' to '"
<>
destination
<>
"'"
exists
<-
doesPathExist
destination
case
(
exists
,
overwritePolicy
)
of
(
True
,
NeverOverwrite
)
->
pure
False
(
True
,
AlwaysOverwrite
)
->
remove
>>
copy
(
False
,
_
)
->
copy
where
source
=
sourceDir
</>
exeName
source
=
sourceDir
</>
exeName
destination
=
installdir
</>
finalExeName
remove
=
do
isDir
<-
doesDirectoryExist
destination
...
...
cabal-install/Distribution/Client/InstallSymlink.hs
View file @
6882787d
...
...
@@ -186,6 +186,10 @@ symlinkBinaries platform comp overwritePolicy
cinfo
=
compilerInfo
comp
(
CompilerId
compilerFlavor
_
)
=
compilerInfoId
cinfo
-- | Symlink binary.
--
-- The paths are take in pieces, so we can make relative link when possible.
--
symlinkBinary
::
OverwritePolicy
-- ^ Whether to force overwrite an existing file
->
FilePath
-- ^ The canonical path of the public bin dir eg
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment