Skip to content

Commit a831188

Browse files
committed
Use child_process instead of shelljs
1 parent a28158a commit a831188

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import * as core from '@actions/core'
2-
import * as shell from 'shelljs'
3-
import * as path from 'path'
1+
import { info, setFailed, getInput, warning } from '@actions/core'
2+
import { join as path } from 'path'
3+
import { execFileSync } from 'child_process'
44

55
try {
66
checkInputs()
7-
shell.exec(path.join(__dirname, '../src/entrypoint.sh'))
7+
execFileSync(path(__dirname, 'entrypoint.sh'))
88
} catch (err) {
9-
core.setFailed(err)
9+
setFailed(err)
1010
}
1111

1212
function checkInputs() {
@@ -16,11 +16,11 @@ function checkInputs() {
1616
setDefault('author_name', author.name)
1717
setDefault('author_email', author.email)
1818
} else {
19-
core.warning('No event path available, unable to fetch author info.')
19+
warning('No event path available, unable to fetch author info.')
2020
setDefault('author_name', 'Add & Commit Action')
2121
setDefault('author_email', '[email protected]')
2222
}
23-
core.info(`Using '${core.getInput('author_name')} <${core.getInput('author_email')}>' as author.`)
23+
info(`Using '${getInput('author_name')} <${getInput('author_email')}>' as author.`)
2424
}
2525

2626
function setDefault(input: string, value: string) {

0 commit comments

Comments
 (0)