fix: template missing return

This commit is contained in:
Alexandre Bodin 2024-09-26 10:56:11 +02:00
parent 9cb35c0a30
commit ea6752c0cc

View File

@ -75,12 +75,23 @@ export async function copyTemplate(scope: Scope, rootPath: string) {
}
if (scope.templateBranch) {
await downloadGithubRepo(rootPath, {
owner,
repo,
branch: scope.templateBranch,
subPath: scope.templatePath,
});
await retry(
() =>
downloadGithubRepo(rootPath, {
owner,
repo,
branch: scope.templateBranch,
subPath: scope.templatePath,
}),
{
retries: 3,
onRetry(err, attempt) {
console.log(`Retrying to download the template. Attempt ${attempt}. Error: ${err}`);
},
}
);
return;
}
await retry(