Make logs foldable
This commit is contained in:
parent
6eb237a86d
commit
83681c63a7
4 changed files with 10 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { spawnSync } from 'child_process'
|
||||
import { setFailed } from '@actions/core'
|
||||
import { setFailed, startGroup, endGroup } from '@actions/core'
|
||||
import { Inputs } from '../inputs'
|
||||
import { patchPnpmEnv } from '../utils'
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ export function runPnpmInstall(inputs: Inputs) {
|
|||
if (options.args) args.push(...options.args)
|
||||
|
||||
const cmdStr = ['pnpm', ...args].join(' ')
|
||||
console.log('Running', cmdStr)
|
||||
startGroup(`Running ${cmdStr}...`)
|
||||
|
||||
const { error, status } = spawnSync('pnpm', args, {
|
||||
stdio: 'inherit',
|
||||
|
|
@ -21,6 +21,8 @@ export function runPnpmInstall(inputs: Inputs) {
|
|||
env,
|
||||
})
|
||||
|
||||
endGroup()
|
||||
|
||||
if (error) {
|
||||
setFailed(error)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue