-
Notifications
You must be signed in to change notification settings - Fork 923
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
Metadata fetching: Don't fallback to git
if not installed
#6409
Conversation
Put this up as a draft for feedback because there are two different possible approaches... before merge, will need to remove one of them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's simpler to rescue Errno::ENOENT
directly from running git ls-remote
? I don't think that error can be raised in any situation other than git
not being in PATH
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
annotating the changes
c0df633
to
0750981
Compare
Switched to rescuing This is ready for review. I'm not sure:
|
0750981
to
e7dba12
Compare
This git fallback is being hit whenever there's a non-`200` response code. However, if `git` isn't installed, this will result in throwing: ```shell Errno::ENOENT with No such file or directory - git ``` So catch the error and handle it.
e7dba12
to
3ff8f1c
Compare
…ot#6409) This git fallback is being hit whenever there's a non-`200` response code. However, if `git` isn't installed, this will result in throwing: ```shell Errno::ENOENT with No such file or directory - git ``` So catch the error and handle it.
This git fallback is being hit whenever there's a non-
200
response code. However, ifgit
isn't installed, this will result in throwing:So only fallback to
git
if installed.