Wrap test runner image getter

This commit is contained in:
plondon 2021-10-17 16:42:47 -04:00
parent aeb55dc490
commit 0340f36564
1 changed files with 11 additions and 5 deletions

View File

@ -570,12 +570,18 @@ async function writeLog(lang, type, result, log) {
}
async function getImageHash(tag) {
const output = (
await run(["docker", "inspect", `riju:${tag}`], console.error, {
const output = await run(
["docker", "inspect", `riju:${tag}`],
console.error,
{
suppressOutput: true,
}).output
);
return JSON.parse(output)[0].Config.Labels["riju.image-hash"];
}
).output;
try {
return JSON.parse(output)[0].Config.Labels["riju.image-hash"];
} catch (e) {
console.log(e);
}
}
async function main() {