MercuryTechnologies / ghciwatch

Load a GHCi session for a Haskell project and reload it when source files change
https://mercurytechnologies.github.io/ghciwatch/
MIT License
111 stars 10 forks source link

Missleading error message when there is no binary on the path. #305

Open popara opened 3 months ago

popara commented 3 months ago

What happened?

It seems that when running a non-existant command gives out wrong error message.

I am using stackage based repo, and I didn't had hpack installed. But error message gave wrong clue

What did you expect to happen?

To tell me that I am missing hpack.

Steps to reproduce the issue

Make sure you DONT have hpack in you PATH.

❯ ghciw  --before-startup-shell hpack 
• Running before-startup command command=hpack
• $ hpack
Error:   × Tasks failed:
  │ • run_ghci: Failed to start `ghci`

make: *** [gwdev] Error 1

~/projects/zoo trunk*
❯ ghci
GHCi, version 9.2.8: https://www.haskell.org/ghc/  :? for help
^[[ALoaded GHCi configuration from /Users/popara/projects/zoo/.ghci
GHCI >> 1 + 2
3

The version of ghciwatch with the bug

ghciwatch 1.0.0

9999years commented 2 months ago

Yeah that's pretty bad, I'll have to look into this