mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Check buffer length (#668)
* Check buffer len * Update execute.ts * Format
This commit is contained in:
parent
7e40b83dc2
commit
f8dc4cf21d
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user