From e4cb2034d1c40ce27088ff2d5b956a33b860e64f Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sun, 12 May 2024 11:11:24 -0400 Subject: [PATCH] Fix code scanning alert --- scripts/utils.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/utils.mjs b/scripts/utils.mjs index a3b1aa86..7b4b5701 100644 --- a/scripts/utils.mjs +++ b/scripts/utils.mjs @@ -4,7 +4,7 @@ import { format } from 'node:util'; import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { execSync } from 'node:child_process'; +import { execFileSync } from 'node:child_process'; /** * Returns the directory of the current module. (utils.mjs) @@ -140,7 +140,7 @@ export const removeDuplicates = arr => { export const getLastUpdated = path => { try { const lastUpdated = new Date( - execSync(`git log -1 --format=%cd -- ${path}`).toString().trim() + execFileSync("git", ["log", "-1", "--format=%cd", "--", path]).toString().trim() ); if (isNaN(lastUpdated.getTime())) {