Skip to content

Commit d8573f8

Browse files
committed
fix(tag): fix tag logs
It seems like simple-git handlers don't work for custom git tag commands Promises still work, we'll try to use them then
1 parent cac5e6b commit d8573f8

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,16 @@ console.log(`Running in ${baseDir}`)
8686

8787
if (getInput('tag')) {
8888
info('> Tagging commit...')
89-
await git.tag(getInput('tag').split(' '), (err, data?) => {
90-
if (data) setOutput('tagged', 'true')
91-
return log(err, data)
92-
})
89+
await git
90+
.tag(getInput('tag').split(' '), (err, data?) => {
91+
if (data) setOutput('tagged', 'true')
92+
return log(err, data)
93+
})
94+
.then((data) => {
95+
setOutput('tagged', 'true')
96+
return log(null, data)
97+
})
98+
.catch((err) => log(err))
9399
} else info('> No tag info provided.')
94100

95101
if (getInput('push')) {

0 commit comments

Comments
 (0)