From d9d3f7e69dcd26702c0762c68c5e72d3adbfd3ca Mon Sep 17 00:00:00 2001 From: haoziqaq <357229046@qq.com> Date: Fri, 31 Dec 2021 01:11:08 +0800 Subject: [PATCH] refactor(cli): optimize error handle --- packages/varlet-cli/src/commands/release.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/varlet-cli/src/commands/release.ts b/packages/varlet-cli/src/commands/release.ts index 60a3261dad5..2dfa53db2fe 100644 --- a/packages/varlet-cli/src/commands/release.ts +++ b/packages/varlet-cli/src/commands/release.ts @@ -38,11 +38,7 @@ async function pushGit(version: string) { const ret = await execa('git', ['push']) s.succeed('Push remote repository successfully') - if (ret.stderr) { - throw new Error('\n' + ret.stderr) - } else { - ret.stdout && logger.info(ret.stdout) - } + ret.stdout && logger.info(ret.stdout) } type packageJsonMap = {