Skip to content

Environment file from cabal new-install ... --package-env . has wrong store dir. #5925

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

Closed
fryguybob opened this issue Mar 7, 2019 · 1 comment · Fixed by #6298
Closed

Comments

@fryguybob
Copy link

On Windows in my cabal/config I have store-dir: D:\cabal\store. When I run:

PS C: test-cabal> cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library
PS C: test-cabal> cabal new-install ascii-cows --lib --package-env .
...

I get an environment file as expected, but with the wrong package-db entry:

PS C: test-cabal> cat .\.ghc.environment.x86_64-mingw32-8.6.4
clear-package-db
global-package-db
package-db C:\Users\Ryan.Yates\AppData\Roaming\cabal\store\ghc-8.6.4\package.db
package-id ghc-8.6.4
package-id bytestring-0.10.8.2
package-id base-4.12.0.0
package-id time-1.8.0.2
package-id hpc-0.6.0.3
package-id filepath-1.4.2.1
package-id process-1.6.5.0
package-id array-0.5.3.0
package-id integer-gmp-1.0.2.0
package-id containers-0.6.0.1
package-id ghc-boot-8.6.4
package-id binary-0.8.6.0
package-id ghc-prim-0.5.3
package-id ghci-8.6.4
package-id rts
package-id transformers-0.5.6.2
package-id deepseq-1.4.4.0
package-id ghc-boot-th-8.6.4
package-id pretty-1.1.3.6
package-id template-haskell-2.14.0.0
package-id directory-1.3.3.0
package-id text-1.2.3.1
package-id acme-dont-1.1-59f6208a892c7b15deee73943657a86fb76b00ee
PS C: test-cabal> ghci
GHCi, version 8.6.4: http://www.haskell.org/ghc/  :? for help
Loaded package environment from C:\Users\Ryan.Yates\Desktop\test-cabal\.ghc.environment.x86_64-mingw32-8.6.4
ghc.exe: can't find a package database at C:\Users\Ryan.Yates\AppData\Roaming\cabal\store\ghc-8.6.4\package.db

Fixing that line in the environment file to package-db D:\cabal\store\ghc-8.6.4\package.db and it works as expected.

@fgaz
Copy link
Member

fgaz commented Mar 10, 2019

Pinging @typedrat

DanielG pushed a commit that referenced this issue Oct 22, 2019
…ckage-env` (#6298)

Use project config instead of global one to get store-dir and logs-dir.

Fixes #5925
jneira added a commit to jneira/cabal that referenced this issue Nov 5, 2019
…ckage-env` (haskell#6298)

Use project config instead of global one to get store-dir and logs-dir.

Fixes haskell#5925

(cherry picked from commit 9e0ab3b)
phadej pushed a commit to phadej/cabal that referenced this issue Dec 13, 2019
…ckage-env` (haskell#6298)

Use project config instead of global one to get store-dir and logs-dir.

Fixes haskell#5925
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

Successfully merging a pull request may close this issue.

2 participants