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

support cabal new-build #186

Closed
gelisam opened this issue Mar 17, 2018 · 0 comments · Fixed by #242
Closed

support cabal new-build #186

gelisam opened this issue Mar 17, 2018 · 0 comments · Fixed by #242
Milestone

Comments

@gelisam
Copy link
Owner

gelisam commented Mar 17, 2018

hawk uses its executable's location to guess where the corresponding package database is. This works with cabal sandboxes:

$ cabal sandbox init
$ cabal install
[...]
$ cabal exec hawk '2+2'
4
$ .cabal-sandbox/bin/hawk '2+2'
4

and with stack:

$ stack build
$ stack exec hawk '2+2'
4
$ .stack-work/dist/x86_64-osx/Cabal-2.0.1.0/build/hawk/hawk '2+2'

but not with cabal new-build:

$ cabal new-build
$ ./dist-newstyle/build/x86_64-osx/ghc-8.2.2/haskell-awk-1.1.1/build/hawk/hawk '2+2'
hawk: No package-db found. Did you install Hawk in an unusual way?
CallStack (from HasCallStack):
  error, called at src/System/Console/Hawk/Sandbox.hs:81:14 in main:System.Console.Hawk.Sandbox
@gelisam gelisam changed the title support cabal new-build support cabal new-build Mar 17, 2018
@gelisam gelisam added this to the 1.1.2 milestone Mar 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant