Skip to content

Commit 05e409d

Browse files
committed
workflow test
1 parent 49595a1 commit 05e409d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/scripts/build-threat-model.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,19 @@ export function buildSingleTM(yamlFile: string, outputDir: string, options: Buil
244244
console.log('Local plantuml not found, using docker...');
245245
}
246246

247+
const uid = typeof process.getuid === 'function' ? process.getuid() : 1000;
248+
const gid = typeof process.getgid === 'function' ? process.getgid() : 1000;
249+
247250
execSync(
248-
`docker run --rm -v "${imgDir}:/data" -w /data plantuml/plantuml:sha-d2b2bcf -tsvg ${dockerRelativeQuoted}`,
251+
`docker run --rm --user ${uid}:${gid} -v "${imgDir}:/data" -w /data plantuml/plantuml:sha-d2b2bcf -tsvg ${dockerRelativeQuoted}`,
249252
{ stdio: 'inherit' }
250253
);
251254
}
252255
} catch (error) {
253256
console.warn('PlantUML generation failed (Docker or local plantuml required)');
257+
if (error instanceof Error && error.message) {
258+
console.warn(error.message);
259+
}
254260
}
255261
}
256262

0 commit comments

Comments
 (0)