Skip to content

Commit

Permalink
Enabling support for git+http (apacheGH-12)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviesdoclc authored and Christopher J. Brody committed Aug 6, 2018
1 parent 70fec9e commit 65c4cb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var path = require('path');
var fs = require('fs');
var CordovaError = require('cordova-common').CordovaError;
var isUrl = require('is-url');
var isGitUrl = require('is-git-url');
var hostedGitInfo = require('hosted-git-info');

/*
Expand Down Expand Up @@ -154,7 +155,7 @@ function trimID (target) {
var gitInfo = hostedGitInfo.fromUrl(target);
if (gitInfo) {
target = gitInfo.project;
} else if (isUrl(target)) {
} else if (isUrl(target) || isGitUrl(target)) {
// strip away .git and everything that follows
var strippedTarget = target.split('.git');
var re = /.*\/(.*)/;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dependency-ls": "^1.1.0",
"hosted-git-info": "^2.5.0",
"is-url": "^1.2.1",
"is-git-url": "^1.0.0",
"q": "^1.4.1",
"shelljs": "^0.7.0"
},
Expand Down

0 comments on commit 65c4cb2

Please sign in to comment.