Skip to content

Commit aaca8df

Browse files
authored
fix: set generate-authors shell command built from environment values (#2471)
1 parent 31fee15 commit aaca8df

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/generate-authors.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
* names / emails.
88
*/
99

10-
import { execSync } from 'child_process';
10+
import { execFileSync, execSync } from 'child_process';
1111
import path from 'path';
1212
import fs from 'fs';
1313

1414
const packageRootPath = path.resolve(__dirname, '..');
1515

1616
function getAuthorsGitLog(packagePath: string): string[] {
17-
return execSync(
18-
`git log --reverse --format='%aN <%aE>' --use-mailmap -- ${packagePath}`,
17+
return execFileSync(
18+
'git',
19+
['log', '--reverse', '--format=%aN <%aE>', '--use-mailmap', '--', packagePath],
1920
{ cwd: packageRootPath }
2021
).toString().trim().split('\n');
2122
}

0 commit comments

Comments
 (0)