Skip to content

Commit

Permalink
Merge pull request #8 from CanOfSocks/patch-1
Browse files Browse the repository at this point in the history
Update Video - Inject HDR10+ metadata.js
  • Loading branch information
revenz authored Sep 19, 2023
2 parents 26e7463 + a3f4797 commit ebff47f
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions Scripts/Flow/Video/Video - Inject HDR10+ metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,19 @@ function Script(FailFlowOnNoInject) {
}

function processLogs(process, FailFlowOnNoInject) {
if (process.standardOutput) {
//catch errors in stdout
if (`${process.standardOutput}`.toLowerCase().includes("error") && FailFlowOnNoInject && process.exitCode === 0) {
//Logger.ILog("Exit code: " + process.exitCode)
if (process.exitCode !== 0) {
Logger.ELog('Failed with errorcode: ' + process.exitCode);
if (FailFlowOnNoInject) {
Logger.ILog("Failing flow")
return -1;
}
else{
return 0;
else {
Logger.ILog("Continuing flow execution")
return 2;
}
}
}

if (process.standardError) {
Logger.ELog('Standard error: ' + process.standardError);
if (FailFlowOnNoInject) {
Expand All @@ -131,16 +135,18 @@ function processLogs(process, FailFlowOnNoInject) {
return 2;
}
}

if (process.exitCode !== 0) {
Logger.ELog('Failed with errorcode: ' + process.exitCode);
if (FailFlowOnNoInject) {
Logger.ILog("Failing flow")

if (process.standardOutput) {
//catch errors in stdout
if (`${process.standardOutput}`.toLowerCase().includes("error") && FailFlowOnNoInject && process.exitCode === 0) {
return -1;
}
else {
Logger.ILog("Continuing flow execution")
else if(/error/i.test(process.standardOutput) === true && process.exitCode === 0){
return 2;
}
else{
return 0;
}
}
}

}

0 comments on commit ebff47f

Please sign in to comment.