Merge branch 'main' into mocha-empty-test-suite

This commit is contained in:
Michal Dorner 2022-11-13 13:20:55 +01:00
commit 48bf7af48b
No known key found for this signature in database
GPG key ID: 7325B8B59CA1B65C
21 changed files with 3328 additions and 3280 deletions

View file

@ -1,21 +0,0 @@
import {exec as execImpl, ExecOptions} from '@actions/exec'
// Wraps original exec() function
// Returns exit code and whole stdout/stderr
export default async function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise<ExecResult> {
options = options || {}
let stdout = ''
let stderr = ''
options.listeners = {
stdout: (data: Buffer) => (stdout += data.toString()),
stderr: (data: Buffer) => (stderr += data.toString())
}
const code = await execImpl(commandLine, args, options)
return {code, stdout, stderr}
}
export interface ExecResult {
code: number
stdout: string
stderr: string
}

View file

@ -1,11 +1,11 @@
import * as core from '@actions/core'
import exec from './exec'
import {getExecOutput} from '@actions/exec'
export async function listFiles(): Promise<string[]> {
core.startGroup('Listing all files tracked by git')
let output = ''
try {
output = (await exec('git', ['ls-files', '-z'])).stdout
output = (await getExecOutput('git', ['ls-files', '-z'])).stdout
} finally {
fixStdOutNullTermination()
core.endGroup()

View file

@ -6,8 +6,8 @@ export enum Align {
}
export const Icon = {
skip: '✖️', // ':heavy_multiplication_x:'
success: '✔️', // ':heavy_check_mark:'
skip: '⚪', // ':white_circle:'
success: '✅', // ':white_check_mark:'
fail: '❌' // ':x:'
}