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
d4bcf702
Verified
Commit
d4bcf702
authored
4 years ago
by
Julian Ospald
Browse files
Options
Downloads
Plain Diff
Merge branch 'PR/fix-109'
parents
e5a60d1b
d82e189c
No related branches found
No related tags found
1 merge request
!64
Fix failed ghcup upgrade if destination dir doesn't exist
Pipeline
#31401
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/GHCup.hs
+9
-4
9 additions, 4 deletions
lib/GHCup.hs
with
9 additions
and
4 deletions
lib/GHCup.hs
+
9
−
4
View file @
d4bcf702
...
...
@@ -1314,12 +1314,17 @@ upgradeGHCup dls mtarget force pfreq = do
tmp
<-
lift
withGHCupTmpDir
let
fn
=
[
rel
|
ghcup
|]
p
<-
liftE
$
download
dli
tmp
(
Just
fn
)
let
fullDest
=
fromMaybe
(
binDir
</>
fn
)
mtarget
liftIO
$
hideError
NoSuchThing
$
deleteFile
fullDest
let
destDir
=
dirname
destFile
destFile
=
fromMaybe
(
binDir
</>
fn
)
mtarget
lift
$
$
(
logDebug
)
[
i
|
mkdir -p #{toFilePath destDir}
|]
liftIO
$
createDirRecursive'
destDir
lift
$
$
(
logDebug
)
[
i
|
rm -f #{toFilePath destFile}
|]
liftIO
$
hideError
NoSuchThing
$
deleteFile
destFile
lift
$
$
(
logDebug
)
[
i
|
cp #{toFilePath p} #{toFilePath destFile}
|]
handleIO
(
throwE
.
CopyError
.
show
)
$
liftIO
$
copyFile
p
fullDest
destFile
Overwrite
lift
$
chmod_755
fullDest
lift
$
chmod_755
destFile
pure
latestVer
...
...
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