From 8efe3f771670fc461276037e904cfa9ac046da5c Mon Sep 17 00:00:00 2001 From: Zeroday BYTE Date: Thu, 12 Jun 2025 05:18:47 +0700 Subject: [PATCH] Update generate-authors.ts --- scripts/generate-authors.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/generate-authors.ts b/scripts/generate-authors.ts index 1aa320325f..8b49cb734c 100644 --- a/scripts/generate-authors.ts +++ b/scripts/generate-authors.ts @@ -7,15 +7,16 @@ * names / emails. */ -import { execSync } from 'child_process'; +import { execFileSync, execSync } from 'child_process'; import path from 'path'; import fs from 'fs'; const packageRootPath = path.resolve(__dirname, '..'); function getAuthorsGitLog(packagePath: string): string[] { - return execSync( - `git log --reverse --format='%aN <%aE>' --use-mailmap -- ${packagePath}`, + return execFileSync( + 'git', + ['log', '--reverse', '--format=%aN <%aE>', '--use-mailmap', '--', packagePath], { cwd: packageRootPath } ).toString().trim().split('\n'); }