feat: replace exec with execFile

This commit is contained in:
C4illin 2025-03-06 18:16:51 +01:00
parent c1b75a13fd
commit 9263d17609
10 changed files with 869 additions and 855 deletions

View file

@ -1,4 +1,4 @@
import { exec } from "node:child_process";
import { execFile } from "node:child_process";
export const properties = {
from: {
@ -119,10 +119,8 @@ export async function convert(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
options?: unknown,
): Promise<string> {
const command = `assimp export "${filePath}" "${targetPath}"`;
return new Promise((resolve, reject) => {
exec(command, (error, stdout, stderr) => {
execFile("assimp", ["export", filePath, targetPath], (error, stdout, stderr) => {
if (error) {
reject(`error: ${error}`);
}