diff options
| author | eric sciple <ericsciple@users.noreply.github.com> | 2020-03-12 11:42:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-12 11:42:38 -0400 |
| commit | 6f1b729011b34bc28608462b6293df85180aba9c (patch) | |
| tree | 21ab78013bc7cc88344c3cb9feaaa42213b20407 /src/git-source-provider.ts | |
| parent | 1b406b27feed694fb3a05a638c92124514baa6ea (diff) | |
persist core.sshCommand for submodules (#184)
* persist core.sshCommand for submodules
* update verbiage; add comments
* fail when submodules or ssh-key and fallback to REST API
Diffstat (limited to 'src/git-source-provider.ts')
| -rw-r--r-- | src/git-source-provider.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts index 7ce9fb7..4bce702 100644 --- a/src/git-source-provider.ts +++ b/src/git-source-provider.ts @@ -57,6 +57,16 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> { core.info( `To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH` ) + if (settings.submodules) { + throw new Error( + `Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.` + ) + } else if (settings.sshKey) { + throw new Error( + `Input 'ssh-key' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.` + ) + } + await githubApiHelper.downloadRepository( settings.authToken, settings.repositoryOwner, |
