Skip to content

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

Merged
huntc merged 1 commit intotypesafehub:masterfrom
longshorej:cwd-error-msg
Jun 29, 2017
Merged

Ensure that the current working directory exists or exit with intelligible error#513
huntc merged 1 commit intotypesafehub:masterfrom
longshorej:cwd-error-msg

Conversation

@longshorej
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

fsat commented Jun 28, 2017

@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.

@huntc huntc merged commit a0fdeac into typesafehub:master Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants