Skip to content

"Exception ~/.stack/indices/Hackage/hackage-security-lock: createDirectory: already exists" #3055

@sjakobi

Description

@sjakobi

I got the following exception after aborting the previous stack command with Ctrl+C:

~/s/hackage-server (master|✔) $ stack init --ignore-subdirs
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- hackage-server.cabal

Selecting the best among 10 snapshots...

Missing some cabal revision files, updating indices
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading timestamp                                                                            
Exception /home/simon/.stack/indices/Hackage/hackage-security-lock: createDirectory: already exists (File exists) when using mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Selected mirror http://hackage.fpcomplete.com/                                                   
Downloading timestamp                                                                            
Exception /home/simon/.stack/indices/Hackage/hackage-security-lock: createDirectory: already exists (File exists) when using mirror http://hackage.fpcomplete.com/
Selected mirror http://objects-us-west-1.dream.io/hackage-mirror/                                
Downloading timestamp                                                                            
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) .../home/simon/.stack/indices/Hackage/hackage-security-lock: createDirectory: already exists (File exists)
~/s/hackage-server (master|✔) $ stack --version
Version 1.4.1, Git revision 036ca52fed01ec51e5e537e4c6cc557ec7363784 (dirty) (4658 commits) x86_64 hpack-0.17.0

My guess is that the lock directory wasn't removed during the exception cleanup for the previous command.

rmdir ~/.stack/indices/Hackage/hackage-security-lock fixed the immediate problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions