Skip to content

Commit 9131d52

Browse files
committed
revert bootstrap changes
1 parent ef3edf8 commit 9131d52

1 file changed

Lines changed: 19 additions & 26 deletions

File tree

.github/actions/find/bootstrap.js

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,24 @@ import {spawn} from 'node:child_process'
77

88
function spawnPromisified(command, args, {quiet = false, ...options} = {}) {
99
return new Promise((resolve, reject) => {
10-
try {
11-
const proc = spawn(command, args, options)
12-
proc.stdout.setEncoding('utf8')
13-
proc.stdout.on('data', data => {
14-
// if (!quiet) {
15-
console.log('data: ', data)
16-
// }
17-
})
18-
proc.stderr.setEncoding('utf8')
19-
proc.stderr.on('data', data => {
20-
console.log('error on read data', data)
21-
console.error(data)
22-
})
23-
proc.on('close', code => {
24-
if (code !== 0) {
25-
reject(code)
26-
} else {
27-
resolve(code)
28-
}
29-
})
30-
} catch (error) {
31-
console.log('error on catch: ', error)
32-
reject(error)
33-
}
10+
const proc = spawn(command, args, options)
11+
proc.stdout.setEncoding('utf8')
12+
proc.stdout.on('data', data => {
13+
if (!quiet) {
14+
console.log(data)
15+
}
16+
})
17+
proc.stderr.setEncoding('utf8')
18+
proc.stderr.on('data', data => {
19+
console.error(data)
20+
})
21+
proc.on('close', code => {
22+
if (code !== 0) {
23+
reject(code)
24+
} else {
25+
resolve(code)
26+
}
27+
})
3428
})
3529
}
3630

@@ -57,12 +51,11 @@ await (async () => {
5751
quiet: true,
5852
})
5953
} catch (error) {
60-
console.log('error in build catch: ', error)
6154
core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`)
6255
process.exit(1)
6356
}
6457
// Run the main script.
65-
core.info('Running find Action index.js...')
58+
core.info('Running file Action index.js...')
6659
const action = await import('./dist/index.js')
6760
await action.default()
6861
}

0 commit comments

Comments
 (0)