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

Return SSH URL format for getGitSSHUrl #1081

Merged
merged 2 commits into from Oct 31, 2016

Conversation

diorahman
Copy link

Summary

At this line https://github.com/diorahman/yarn/blob/master/src/fetchers/git-fetcher.js#L20 the GitFetcher._fetch should have a resolved URL (from hosted, private repo) that has protocol. If not the actual fetching always falls through to fetchFromLocal.

Test plan

Create a private repo on github. E.g. For my test I have https://github.com/HOOQTV/inbox and it has several releases, one of them: v0.1.0.

Then try to yarn add github:hooqtv/inbox#v0.1.0.

Before this PR:

β–² ev: yarn add github:hooqtv/inbox#v0.1.0
yarn add v0.1.0
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
error git@github.com:hooqtv/inbox.git: Tarball is not in network and can not be located in cache (/Users/diorahman/Experiments/hooq/src/misc/ev/git@github.com:hooqtv/inbox.git)
info Visit http://yarnpkg.com/en/docs/cli/add for documentation about this command.

After

  β–² ev: yarn add github:hooqtv/inbox#v0.1.0
yarn add v0.1.0
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.

@bestander
Copy link
Member

@diorahman looks reasonable.
Could you rebase and add a test please?

@bestander bestander self-assigned this Oct 28, 2016
Copy link
Member

@bestander bestander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need tests to ensure it does not break

Dhi Aurrahman added 2 commits October 30, 2016 10:05
At `GitFetcher._fetch` protocol should be there for the resolved URL
resulted from `HostedGitResolver.getGitSSHUrl`. If not, the actual
fetching process fails.
@diorahman
Copy link
Author

@bestander please let me know if you think we need more tests

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.

None yet

3 participants