gelisam / hawk

Haskell text processor for the command-line
Apache License 2.0
361 stars 20 forks source link

ghc: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory) #161

Open sboosali opened 8 years ago

sboosali commented 8 years ago

steps:

$ stack install haskell-awk
Copied executables to /Users/michaelboosalis/.local/bin:
- hawk

$ hawk
Usage ...

$ seq 0 3 | hawk -a 'L.reverse'
hawk: ghc: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)

with:

OSX 10.11.5


$ cat stack.yaml
resolver: lts-6.1

$ stack exec -- ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3
gelisam commented 8 years ago

Probably a duplicate of #155, which adds support for stack. Except it seems your symptoms are different?

shirouto commented 5 years ago

If I understand this correctly, every time the user modifies ~/.hawk/prelude.hs hawk will invoke ghc via System.Process.readProcessWithExitCode "ghc" to (re-)compile the user prelude. However, stack does not install a particular ghc in the $PATH. Of course, running stack exec hawk in the source base will compile successfully the prelude and one can use hawk thereafter. This or simply adding the stack installed ghc path to $PATH would be temporary ways around this issue, albeit a tad cumbersome.