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
3642d2db
Unverified
Commit
3642d2db
authored
Mar 16, 2020
by
Oleg Grenrus
Committed by
GitHub
Mar 16, 2020
Browse files
Merge pull request #6590 from phadej/pr-6582-show-exe-path
Installing (copy or symlink) executable message prints destination.
parents
b71d3db6
6882787d
Changes
2
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/CmdInstall.hs
View file @
3642d2db
...
...
@@ -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 @
3642d2db
...
...
@@ -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