elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.48k stars 659 forks source link

Failed to find working directory #2237

Open 13r0ck opened 2 years ago

13r0ck commented 2 years ago

Quick Summary: Trying to install a package in elm while in a folder that was recently deleted throws an unhelpful error.

SSCCE

Run in an elm init folder

Additional Details

Steps to reproduce:

  1. Create a new elm project
  2. cd into the folder
  3. in a separate terminal delete the folder containing the project
  4. Run elm install <any package> Then the user will receive the generic I ran into something that bypassed the normal error reporting process! error with the line getCurrentDirectory:getWorkingDirectory: does not exist (Current working directory no longer exists).

This will occur even if the user then creates a project with the same name in the same location.

This error isn't as helpful as the elm standard. Something like

I can't seem to find this folder. Was it recently deleted?

Try leaving this folder and changing directories back into this, or restart your terminal

Would be awesome and more than suffice for this rather extreme edge case.

github-actions[bot] commented 2 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.