Skip to content

Commit 1a929f3

Browse files
WeslleyNasRochaJounQin
authored andcommitted
fix: add check for empty tag list before pushing tags to remote
1 parent e1de87a commit 1a929f3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/git-utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ export const pushTags = async () => {
3535
])
3636
// Separate the tags into a list
3737
const tagList = tags.split('\n')
38-
// Push the tags individually to the remote
39-
for (const tag of tagList) {
40-
await exec('git', ['push', 'origin', tag])
38+
if (tagList.length > 0) {
39+
// Push the tags individually to the remote
40+
for (const tag of tagList) {
41+
await exec('git', ['push', 'origin', tag])
42+
}
4143
}
4244
}
4345

0 commit comments

Comments
 (0)