Skip to content

Commit

Permalink
fix up debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbudd committed Sep 18, 2024
1 parent 7aa1fd2 commit 3101231
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/virusTotalAnalysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function getVirusTotalAnalysisIfRequired({core}, metadataFile) {
core.info('VirusTotal analysis skipped, already performed');
return;
}
if (apiUsageCount >= 10) {
if (core._apiUsageCount >= 10) {
core.info('VirusTotal API usage limit reached');
throw new Error('VirusTotal API usage limit reached');
}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/virusTotalSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ function submitAddonIfNotScanned({core}, metadataFile) {
countAPIUsageAndWait({core});
// Check if file has been scanned before
exec(`vt file ${sha256} -k ${process.env.VT_API_KEY} --format json`, (err, stdout, stderr) => {
console.debug(`stdout: ${stdout}`);
console.debug(`stderr: ${stderr}`);
console.debug(`err: ${err}`);
core.debug(`stdout: ${stdout}`);
core.debug(`stderr: ${stderr}`);
core.debug(`err: ${err}`);
try {
const vtData = JSON.parse(stdout);
console.debug(`Add-on file ${metadataFile} already submitted, results: ${vtData}`);
core.debug(`Add-on file ${metadataFile} already submitted, results: ${vtData}`);
return;
} catch (e) {
console.debug(`Add-on file ${metadataFile} has not been scanned before`);
// File has not been scanned before,
core.debug(`Add-on file ${metadataFile} has not been scanned before`);
// File has not been scanned before,
// download and submit add-on file
downloadAndSubmitAddon({core}, addonMetadata);
}
Expand Down

0 comments on commit 3101231

Please sign in to comment.