-
-
Notifications
You must be signed in to change notification settings - Fork 150
Fix fetching npm packages from git repositories #2403
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
base: main
Are you sure you want to change the base?
Conversation
Aspect_rules_js supports fetching a git repository containing an npm package. However, to follow that path, it is required that the URL of the repository is prefixed with `git+`. However, this URL is then also configured as the remote for the git repository. The `git+` prefix is not supported by git and thus fetching fails with: git: 'remote-git+https' ist kein Git-Befehl. Siehe 'git --help'. To prevent this, the `git+`-prefix is now being removed, if it is present before setting it as remote url.
|
|
|
|
Can you add a test which fails without your fix? |



Aspect_rules_js supports fetching a git repository containing an npm package. However, to follow that path, it is required that the URL of the repository is prefixed with
git+. However, this URL is then also configured as the remote for the git repository. Thegit+prefix is not supported by git and thus fetching fails with:git: 'remote-git+https' ist kein Git-Befehl. Siehe 'git --help'.
To prevent this, the
git+-prefix is now being removed, if it is present before setting it as remote url.formation ends up in the git log.-->
Changes are visible to end-users: no
Test plan
Install an NPM package from a git repository. The pnpm-lock.yaml may look like this: