Skip to content

Commit 02c565b

Browse files
Merge pull request #10 from MtMath/fix-github-process
fix(GitHub): process exit when invalid token
2 parents 21348b6 + 833cf30 commit 02c565b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/modules/github.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Octokit } from "@octokit/rest";
22

33
export const createGitHubRepo = async (data: Record<string, any>) => {
44

5-
if(data.enableGit === false) return "";
5+
if(!data.enableGit) return "";
66
const token = data.GITHUB_ACCESS_TOKEN;
77
const repoName = data.repoName;
88

@@ -15,8 +15,8 @@ export const createGitHubRepo = async (data: Record<string, any>) => {
1515

1616
return response.data.clone_url;
1717
} catch (error) {
18-
console.error(`Error when create repository on GitHub: ${error}`);
19-
process.exit(1);
18+
console.error(`Skipped - create repository on GitHub: ${error}`);
19+
return ""
2020
}
2121
};
2222

0 commit comments

Comments
 (0)