mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-08 19:39:09 +08:00
Cloud Runner v2 (#310)
This commit is contained in:
@@ -2,7 +2,7 @@ import * as core from '@actions/core';
|
||||
import { exec } from '@actions/exec';
|
||||
|
||||
class System {
|
||||
static async run(command, arguments_: any = [], options = {}) {
|
||||
static async run(command, arguments_: any = [], options = {}, shouldLog = true) {
|
||||
let result = '';
|
||||
let error = '';
|
||||
let debug = '';
|
||||
@@ -20,15 +20,15 @@ class System {
|
||||
};
|
||||
|
||||
const showOutput = () => {
|
||||
if (debug !== '') {
|
||||
if (debug !== '' && shouldLog) {
|
||||
core.debug(debug);
|
||||
}
|
||||
|
||||
if (result !== '') {
|
||||
if (result !== '' && shouldLog) {
|
||||
core.info(result);
|
||||
}
|
||||
|
||||
if (error !== '') {
|
||||
if (error !== '' && shouldLog) {
|
||||
core.warning(error);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user