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

Ensure --local recognizes locally cached shards #638

Closed

Conversation

GrantBirki
Copy link

This pull request changes how the origin_url method works for the Git resolver. Rather than trying to run native git commands, this method now peers into the local_path dir for the cached shard and directly reads from the INI config file which contains the origin URL. Other methods in the Git resolver do exactly this so we should lean into it here as well.

resolves: #628

@straight-shoota
Copy link
Member

Other methods in the Git resolver do exactly this so we should lean into it here as well.

We're only reading config file directly in valid_repository?. I don't know the reason for this, but it appears we could just use git config instead. Going through the CLI is easier and safer. The git configuration format is quite powerful and supports some forms of indirection that we would need to take into account. I'd prefer to avoid parsing config file directly if possible. Going through the CLI should always be better.

You mentioned in #628 (comment) that you couldn't get the expected behaviour to work. But it's not quite clear to me what didn't work and why. It seems that it should be possible to do this without reading the config file directly.

In order to understand whether this is working as expected, we should add a spec to test the behaviour.

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.

shards install --local doesn't recognize cached shards
2 participants