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

--store-dir global flag doesn't seem to work #5069

Closed
Mistuke opened this issue Jan 24, 2018 · 4 comments
Closed

--store-dir global flag doesn't seem to work #5069

Mistuke opened this issue Jan 24, 2018 · 4 comments

Comments

@Mistuke
Copy link
Collaborator

Mistuke commented Jan 24, 2018

I'm trying to use the --store-dir global flag introduced in #4623 to change the location of the store. But no matter what I try it fails:

$ cabal --store-dir=/e/cabal-store new-test
Build profile: -w ghc-8.0.2 -O1
In order, the following will be built (use -v for more details):
 - base-compat-0.9.3 (lib) (requires build)
 - call-stack-0.1.0 (lib) (requires build)
 - colour-2.3.4 (lib) (requires build)
 - extensible-exceptions-0.1.1.4 (lib:extensible-exceptions) (requires build)
 - ghc-paths-0.1.0.9 (lib:ghc-paths) (requires build)
 - hostname-1.0 (lib:hostname) (requires build)
 - hsc2hs-0.68.2 (exe:hsc2hs) (requires build)
 - mtl-2.2.1 (lib:mtl) (requires build)
 - network-3.0.0.0 (lib) (first run)
 - old-locale-1.0.0.7 (lib) (requires build)
 - random-1.1 (lib) (requires build)
 - syb-0.7 (lib) (requires build)
 - text-1.2.2.2 (lib) (requires build)
 - HUnit-1.6.0.0 (lib) (requires build)
 - ansi-terminal-0.7.1.1 (lib:ansi-terminal) (requires build)
 - code-page-0.1.3 (lib) (requires build)
 - regex-base-0.93.2 (lib:regex-base) (requires build)
 - xml-1.3.14 (lib:xml) (requires build)
 - ansi-wl-pprint-0.6.8.1 (lib:ansi-wl-pprint) (requires build)
 - doctest-0.13.0 (lib) (requires build)
 - regex-posix-0.95.2 (lib:regex-posix) (requires build)
 - network-3.0.0.0 (test:doctest) (first run)
 - test-framework-0.8.1.1 (lib:test-framework) (requires build)
 - test-framework-hunit-0.3.0.2 (lib:test-framework-hunit) (requires build)
 - network-3.0.0.0 (test:simple) (first run)
 - network-3.0.0.0 (test:regression) (first run)
Configuring library for base-compat-0.9.3..
cabal.exe: ghc-pkg dump failed: dieVerbatim: user error (cabal.exe:
'E:\msys64\mingw64\bin\ghc-pkg.exe' exited with an error:
ghc-pkg.exe: C:cabal-store\ghc-8.0.2\package.db:
getDirectoryContents:findFirstFile: does not exist (The system cannot find the
path specified.)
)

Note the weird path it tries C:cabal-store\ghc-8.0.2\package.db which isn't valid due to the missing \ after C: but also isn't even the right drive. I wanted the store to be on E:\.

@alexbiehl
Copy link
Member

alexbiehl commented Jan 25, 2018

This is strange. I just tried cabal --store-dir=D:\\store new-build exe:cabal with cabal HEAD on Windows 10 and it worked as expected.

Edit: also cabal --store-dir=D:\\store new-test worked. And I see you are on ghc-8.0.2. I used ghc-8.2.1.

Edit 2: Even with cabal --store-dir=/d/store ...` it seems to work.

@23Skidoo
Copy link
Member

@Mistuke

--store-dir=/e/cabal-store new-test

Are you using Cygwin by any chance? What if you try --store-dir=e:/cabal-store new-test?

@Mistuke
Copy link
Collaborator Author

Mistuke commented Jan 25, 2018 via email

@Mistuke Mistuke mentioned this issue Feb 6, 2018
3 tasks
@Mistuke
Copy link
Collaborator Author

Mistuke commented Mar 3, 2018

Oddly enough it seems to work now, so I'll chalk this one up to local environment..

@Mistuke Mistuke closed this as completed Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants