diff --git a/src/execute.ts b/src/execute.ts index 02caa011..92da0437 100644 --- a/src/execute.ts +++ b/src/execute.ts @@ -1,6 +1,7 @@ import {exec} from '@actions/exec' +import buffer from 'buffer' -let output: string +let output = '' /** Wrapper around the GitHub toolkit exec command which returns the output. * Also allows you to easily toggle the current working directory. @@ -29,5 +30,7 @@ export async function execute( } export function stdout(data: any): string | void { - output += data.toString().trim() + if (output.length < buffer.constants.MAX_STRING_LENGTH) { + output += data.toString().trim() + } }