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
82a8c61c
Commit
82a8c61c
authored
4 years ago
by
Arjun Kathuria
Browse files
Options
Downloads
Patches
Plain Diff
adds bin dir removal code, checking for XDG
parent
3fae516c
No related branches found
No related tags found
1 merge request
!101
[WIP] Feature "nuke"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/GHCup.hs
+13
-0
13 additions, 0 deletions
lib/GHCup.hs
with
13 additions
and
0 deletions
lib/GHCup.hs
+
13
−
0
View file @
82a8c61c
...
...
@@ -1341,6 +1341,9 @@ rmGhcupDirs = do
-- remove entire logs Dir
rmLogsDir
logsDir
-- remove bin directory conditionally
rmBinDir
binDir
liftIO
$
print
dirs
where
...
...
@@ -1365,6 +1368,16 @@ rmGhcupDirs = do
forM_
contents
deleteFile
removeDirIfEmpty
logsDir
rmBinDir
binDir
=
do
#
if
!
defined
(
IS_WINDOWS
)
isXDGStyle
<-
useXDG
if
not
isXDGStyle
then
removeDirIfEmpty
binDir
else
pure
()
#
else
removeDirIfEmpty
binDir
#
endif
deleteFile
filepath
=
do
hideError
InappropriateType
$
rmFile
filepath
...
...
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