Add final tweaks to CQ customizer
This commit is contained in:
@@ -42,7 +42,7 @@ RUN npm install aws-lambda-ric@1.0.0
|
||||
RUN wget \
|
||||
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
|
||||
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
|
||||
&& rm -f Miniconda3-latest-Linux-x86_64.sh
|
||||
&& rm -f Miniconda3-latest-Linux-x86_64.sh
|
||||
RUN conda --version
|
||||
|
||||
# Install CadQuery
|
||||
|
||||
@@ -12,7 +12,7 @@ export const runCQ = async ({
|
||||
{
|
||||
file: JSON.stringify(parameters),
|
||||
fileName: 'params.json',
|
||||
}
|
||||
},
|
||||
],
|
||||
'a' + nanoid() // 'a' ensure nothing funny happens if it start with a bad character like "-", maybe I should pick a safer id generator :shrug:
|
||||
)
|
||||
@@ -36,12 +36,12 @@ export const runCQ = async ({
|
||||
console.log('command', mainCommand)
|
||||
let consoleMessage = ''
|
||||
try {
|
||||
;([consoleMessage] = await Promise.all([
|
||||
;[consoleMessage] = await Promise.all([
|
||||
runCommand(mainCommand, 30000),
|
||||
runCommand(customizerCommand, 30000)
|
||||
]))
|
||||
runCommand(customizerCommand, 30000),
|
||||
])
|
||||
const params = JSON.parse(
|
||||
await readFile(customizerPath, { encoding: 'ascii'})
|
||||
await readFile(customizerPath, { encoding: 'ascii' })
|
||||
)
|
||||
await writeFiles(
|
||||
[
|
||||
@@ -63,6 +63,6 @@ export const runCQ = async ({
|
||||
)
|
||||
return { consoleMessage, fullPath }
|
||||
} catch (error) {
|
||||
return { error: consoleMessage, fullPath }
|
||||
return { error: consoleMessage || error, fullPath }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user