From 82de81015b5cfe6b7f9da37faaab43d72ac619d6 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 23 Sep 2018 12:34:23 -0500 Subject: [PATCH] allow for / in branch name when handling github shortcuts --- lib/utils/template_generator.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/template_generator.js b/lib/utils/template_generator.js index 1693bb491..59d042dbf 100644 --- a/lib/utils/template_generator.js +++ b/lib/utils/template_generator.js @@ -127,8 +127,9 @@ class TemplateGenerator { getExternalProject(uri) { let url, folder; - if (uri.split('/').length === 2) { - //e.g embark-framework/embark + const regex = /^((git@)?(www\.)?github\.com\/)|(https?:\/\/)/; + if (!uri.match(regex) && uri.split('/').length >= 2) { + //e.g embark-framework/embark, embark-framework/embark#branch, embark-framework/embark#features/branch let repoPartAndBranch = uri.split('#'); let repoPart = repoPartAndBranch[0]; let branchName = (repoPartAndBranch.length === 2)? repoPartAndBranch[1] : "master";