Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running cabal sandbox init with shared sandbox creates directory named --list-options #2084

Closed
RyanGlScott opened this issue Sep 1, 2014 · 5 comments

Comments

@RyanGlScott
Copy link
Member

When done a certain way, running cabal sandbox init with a shared sandbox can create an odd directory called --list-options. I've only tested this on Linux so far. Here is how I came across this:

> mkdir sandbox
> cd sandbox/
> cabal sandbox init
Writing a default package environment file to
/.../sandbox/cabal.sandbox.config
Creating a new sandbox at /.../sandbox/.cabal-sandbox
> cabal get hello
Unpacking to hello-1.0.0.2/
> cd hello-1.0.0.2/
> cabal sandbox init --sandbox ../.cabal-sandbox/
Writing a default package environment file to
/.../sandbox/hello-1.0.0.2/cabal.sandbox.config
Using an existing sandbox located at /.../sandbox/.cabal-sandbox
> ls
cabal.sandbox.config  hello.cabal  LICENSE  --list-options  Setup.hs  src
> cd ./--list-options/
> ls
add-source-timestamps  packages  x86_64-linux-ghc-7.8.3-packages.conf.d

Interestingly, the --list-options directory is not created if cabal sandbox init --sandbox=../.cabal-sandbox/ is ran instead of cabal sandbox init --sandbox ../.cabal-sandbox/.

@ezyang
Copy link
Contributor

ezyang commented Sep 1, 2014

My understanding was it had to do with broken shell autocompletion.

@RyanGlScott
Copy link
Member Author

Ah, you're right. It looks like tab-completion is the source of the problem, as copying the above steps only reproduces the issue if Tab is pressed when typing out ../.cabal-sandbox. Is it still fair to characterize this as a cabal-install issue?

@ezyang
Copy link
Contributor

ezyang commented Sep 1, 2014

No, it's a bug in Cabal sandbox; we need to understand the --list-options argument.

@DanBurton
Copy link
Contributor

+1 Also experienced this bug.

@RyanGlScott
Copy link
Member Author

I can't duplicate this bug anymore using cabal-install-1.22.3.0, likely as a result of bug #2513 being fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants