Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
6882787d
Commit
6882787d
authored
5 years ago
by
Lautaro Martin Emanuel
Committed by
Oleg Grenrus
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Installing (copy or symlink) executable message prints destination.
parent
3d93cdd7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cabal-install/Distribution/Client/CmdInstall.hs
+5
-3
5 additions, 3 deletions
cabal-install/Distribution/Client/CmdInstall.hs
cabal-install/Distribution/Client/InstallSymlink.hs
+4
-0
4 additions, 0 deletions
cabal-install/Distribution/Client/InstallSymlink.hs
with
9 additions
and
3 deletions
cabal-install/Distribution/Client/CmdInstall.hs
+
5
−
3
View file @
6882787d
...
@@ -835,24 +835,26 @@ installBuiltExe
...
@@ -835,24 +835,26 @@ installBuiltExe
installBuiltExe
verbosity
overwritePolicy
installBuiltExe
verbosity
overwritePolicy
sourceDir
exeName
finalExeName
sourceDir
exeName
finalExeName
installdir
InstallMethodSymlink
=
do
installdir
InstallMethodSymlink
=
do
notice
verbosity
$
"Symlinking '"
<>
exeName
<>
"'"
notice
verbosity
$
"Symlinking '"
<>
exeName
<>
"' to '"
<>
destination
<>
"'"
symlinkBinary
symlinkBinary
overwritePolicy
overwritePolicy
installdir
installdir
sourceDir
sourceDir
finalExeName
finalExeName
exeName
exeName
where
destination
=
installdir
</>
finalExeName
installBuiltExe
verbosity
overwritePolicy
installBuiltExe
verbosity
overwritePolicy
sourceDir
exeName
finalExeName
sourceDir
exeName
finalExeName
installdir
InstallMethodCopy
=
do
installdir
InstallMethodCopy
=
do
notice
verbosity
$
"Copying '"
<>
exeName
<>
"'"
notice
verbosity
$
"Copying '"
<>
exeName
<>
"' to '"
<>
destination
<>
"'"
exists
<-
doesPathExist
destination
exists
<-
doesPathExist
destination
case
(
exists
,
overwritePolicy
)
of
case
(
exists
,
overwritePolicy
)
of
(
True
,
NeverOverwrite
)
->
pure
False
(
True
,
NeverOverwrite
)
->
pure
False
(
True
,
AlwaysOverwrite
)
->
remove
>>
copy
(
True
,
AlwaysOverwrite
)
->
remove
>>
copy
(
False
,
_
)
->
copy
(
False
,
_
)
->
copy
where
where
source
=
sourceDir
</>
exeName
source
=
sourceDir
</>
exeName
destination
=
installdir
</>
finalExeName
destination
=
installdir
</>
finalExeName
remove
=
do
remove
=
do
isDir
<-
doesDirectoryExist
destination
isDir
<-
doesDirectoryExist
destination
...
...
This diff is collapsed.
Click to expand it.
cabal-install/Distribution/Client/InstallSymlink.hs
+
4
−
0
View file @
6882787d
...
@@ -186,6 +186,10 @@ symlinkBinaries platform comp overwritePolicy
...
@@ -186,6 +186,10 @@ symlinkBinaries platform comp overwritePolicy
cinfo
=
compilerInfo
comp
cinfo
=
compilerInfo
comp
(
CompilerId
compilerFlavor
_
)
=
compilerInfoId
cinfo
(
CompilerId
compilerFlavor
_
)
=
compilerInfoId
cinfo
-- | Symlink binary.
--
-- The paths are take in pieces, so we can make relative link when possible.
--
symlinkBinary
::
symlinkBinary
::
OverwritePolicy
-- ^ Whether to force overwrite an existing file
OverwritePolicy
-- ^ Whether to force overwrite an existing file
->
FilePath
-- ^ The canonical path of the public bin dir eg
->
FilePath
-- ^ The canonical path of the public bin dir eg
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment