chore: adjust script with check remote

pull/38503/head 5.0.0-beta.1
二货机器人 2 years ago
parent f3386666c7
commit 5910f97b8b

@ -52,12 +52,16 @@ async function checkCommit({ files }) {
}
async function checkRemote() {
const { remote } = await git.fetch('origin', 'master');
if (remote?.indexOf('ant-design/ant-design') === -1) {
console.log(
chalk.yellow('😓 Your remote origin is not ant-design/ant-design, did you fork it?'),
);
exitProcess();
try {
const { remote } = await git.fetch('origin', 'master');
if (remote?.indexOf('ant-design/ant-design') === -1) {
console.log(
chalk.yellow('😓 Your remote origin is not ant-design/ant-design, did you fork it?'),
);
exitProcess();
}
} catch (error) {
console.log(chalk.red('🚨 Check remote failed. Skip...'));
}
}

Loading…
Cancel
Save