Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup-hs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Haskell
ghcup-hs
Commits
7189998f
Verified
Commit
7189998f
authored
4 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup rmGhcupDirs a bit
parent
b6b24b8e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/GHCup.hs
+8
-14
8 additions, 14 deletions
lib/GHCup.hs
with
8 additions
and
14 deletions
lib/GHCup.hs
+
8
−
14
View file @
7189998f
...
...
@@ -1375,11 +1375,11 @@ rmGhcupDirs = do
rmEnvFile
envFilePath
rmConfFile
confFilePath
rm
Cache
Dir
cacheDir
rm
Logs
Dir
logsDir
rmDir
cacheDir
rmDir
logsDir
rmBinDir
binDir
#
if
defined
(
IS_WINDOWS
)
rm
Path
(
baseDir
</>
"msys64"
)
rm
Dir
(
baseDir
</>
"msys64"
)
#
endif
liftIO
$
removeEmptyDirsRecursive
baseDir
...
...
@@ -1400,17 +1400,11 @@ rmGhcupDirs = do
$
logInfo
"removing Ghcup Config File"
hideError
doesNotExistErrorType
$
liftIO
$
deleteFile
confFilePath
rmCacheDir
::
(
MonadLogger
m
,
MonadIO
m
)
=>
FilePath
->
m
()
rmCacheDir
cacheDir
=
do
$
logInfo
"removing ghcup cache Dir"
contents
<-
liftIO
$
getDirectoryContentsRecursive
cacheDir
forM_
contents
(
liftIO
.
deleteFile
.
(
cacheDir
</>
))
rmLogsDir
::
(
MonadLogger
m
,
MonadIO
m
)
=>
FilePath
->
m
()
rmLogsDir
logsDir
=
do
$
logInfo
"removing ghcup logs Dir"
contents
<-
liftIO
$
getDirectoryContentsRecursive
logsDir
forM_
contents
(
liftIO
.
deleteFile
.
(
logsDir
</>
))
rmDir
::
(
MonadLogger
m
,
MonadIO
m
)
=>
FilePath
->
m
()
rmDir
dir
=
do
$
logInfo
[
i
|
removing #{dir}
|]
contents
<-
liftIO
$
getDirectoryContentsRecursive
dir
forM_
contents
(
liftIO
.
deleteFile
.
(
dir
</>
))
rmBinDir
::
(
MonadCatch
m
,
MonadIO
m
)
=>
FilePath
->
m
()
rmBinDir
binDir
=
do
...
...
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