Skip to content

Commit 93a9e86

Browse files
committed
fix maintainer-approval.js
Co-authored-by: Isaac
1 parent a54e88f commit 93a9e86

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/maintainer-approval.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const path = require("path");
2-
const { execSync } = require("child_process");
2+
const { execFileSync } = require("child_process");
33
const {
44
parseOwnersFile,
55
findOwners,
@@ -117,8 +117,9 @@ function classifyFile(filepath, totalFiles) {
117117

118118
function gitLog(filepath) {
119119
try {
120-
const out = execSync(
121-
`git log -50 --no-merges --since="12 months ago" --format="%H|%an|%aI" -- "${filepath}"`,
120+
const out = execFileSync(
121+
"git",
122+
["log", "-50", "--no-merges", "--since=12 months ago", "--format=%H|%an|%aI", "--", filepath],
122123
{ encoding: "utf-8" }
123124
);
124125
const entries = [];

0 commit comments

Comments
 (0)