typesafehub / conductr-cli

CLI for Lightbend ConductR
Other
16 stars 21 forks source link

Ensure that the current working directory exists or exit with intelligible error #513

Closed longshorej closed 7 years ago

longshorej commented 7 years ago

This PR adds a check when the CLI starts to ensure the current working directory exists. This can help mitigate weird environmental issues, I know I've launched the CLI from unlinked directories and it wasn't clear what was wrong.

Fixes #502.

Manual test

$ (mkdir ~/testing-wd && cd ~/testing-wd && rm -r ~/testing-wd && bndl -h)
sh: 0: getcwd() failed: No such file or directory
Unable to start CLI due to missing current/working directory.
Change into a new directory and try again.
-> 1
fsat commented 7 years ago

@longshorej - I think this is a friendlier behaviour compared to currently released behaviour, so I'm for it.

I'd like to hear what others have to say, though. So I'll leave this comment here for now.