Skip to content

Commit 552d44e

Browse files
author
zongquan.hzq
committed
fix: fix git push to git push origin branch name
1 parent 8a944ca commit 552d44e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/built-in-plugins/command-publish/plugin/run-publish.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export const publish = async (options: PublishOption) => {
6666

6767
await fs.remove(path.join(pri.projectRootPath, tempPath.dir, declarationPath.dir));
6868

69-
await exec(`git push`);
69+
const currentBranch = execSync('git rev-parse --abbrev-ref HEAD')
70+
.toString('utf8')
71+
.trim();
72+
await exec(`git push origin ${currentBranch}`);
7073
}
7174
break;
7275
}

0 commit comments

Comments
 (0)