Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pkg): Check that git repo dir is accessible #9019

Merged
merged 4 commits into from
Oct 29, 2023

Conversation

Leonidas-from-XIV
Copy link
Collaborator

Instead of going ahead and running git against something that is not an accessible directory, this will at least raise an exception.

Are there better ways to solve it? Except for showing a possibly better error message, not really - if someone has replaced the folder with something we can't access there is no other option than to fail in some way or other.

Instead of going ahead and running git against something that is not an
accessible directory, this will at least raise an exception.

Are there better ways to solve it? Except for showing a possibly better
error message, not really - if someone has replaced the folder with
something we can't access there is no other option than to fail in some
way or other.

Signed-off-by: Marek Kubica <marek@tarides.com>
@Alizter
Copy link
Collaborator

Alizter commented Oct 27, 2023

One option would be to raise a user error and add a hint about deleting the directory, especially if its only Dune that is using it.

_
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
_
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
_
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit 55e60de into ocaml:main Oct 29, 2023
20 checks passed
@rgrinberg
Copy link
Member

Thanks. Merged with a few tweaks.

@Leonidas-from-XIV Leonidas-from-XIV deleted the git-dir-checking branch October 30, 2023 10:04
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