From c25414f9213b2670954f2fe41493a2caa3153576 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Thu, 14 Oct 2021 18:47:44 +1100 Subject: [PATCH] linting runCQ --- app/api/src/docker/cadquery/runCQ.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/api/src/docker/cadquery/runCQ.ts b/app/api/src/docker/cadquery/runCQ.ts index a19e89b..64576cd 100644 --- a/app/api/src/docker/cadquery/runCQ.ts +++ b/app/api/src/docker/cadquery/runCQ.ts @@ -19,21 +19,19 @@ export const runCQ = async ({ const fullPath = `/tmp/${tempFile}/output.gz` const stlPath = `/tmp/${tempFile}/output.stl` const customizerPath = `/tmp/${tempFile}/customizer.json` - const mainCommand = [ + const command = [ `./cq-cli/cq-cli.py`, `--codec stl`, `--infile /tmp/${tempFile}/main.py`, `--outfile ${stlPath}`, `--outputopts "deflection:${deflection};angularDeflection:${deflection};"`, `--params /tmp/${tempFile}/params.json`, - `--getparams ${customizerPath}` + `--getparams ${customizerPath}`, ].join(' ') - console.log('command', mainCommand) + console.log('command', command) let consoleMessage = '' try { - ;[consoleMessage] = await Promise.all([ - runCommand(mainCommand, 30000), - ]) + consoleMessage = await runCommand(command, 30000) const params = JSON.parse( await readFile(customizerPath, { encoding: 'ascii' }) )