Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eladcon committed Jun 13, 2024
1 parent 71ee6be commit a3dbb09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { join } = require("node:path");
const { cpSync, existsSync, mkdtempSync, mkdirSync, readFileSync } = require("node:fs");
const { execSync } = require("node:child_process");
const { execSync, spawnSync } = require("node:child_process");
const { tmpdir } = require("node:os");
const crypto = require("node:crypto");
const glob = require("glob");
Expand Down Expand Up @@ -46,8 +46,14 @@ exports.buildSim = (options) => {
const tryInspect = () => {
try {
console.log("inspecting docker image", imageName, nodePath)
execSync(`docker inspect ${imageName}`, { cwd: __dirname, env: { HOME: homeEnv, PATH: pathEnv } });
console.log("inspected docker image", imageName, nodePath)
const res = spawnSync("docker", ["inspect", imageName]);
if (res.status === 0) {
console.log("inspected docker image", imageName, nodePath)
return true;
}

// execSync(`docker inspect ${imageName}`, { cwd: __dirname, env: { HOME: homeEnv, PATH: pathEnv } });

return true;
} catch {}
};
Expand Down

0 comments on commit a3dbb09

Please sign in to comment.