Skip to content

Commit

Permalink
Fix code scanning alert
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed May 12, 2024
1 parent 4f5eef5 commit e4cb203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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())) {
Expand Down

0 comments on commit e4cb203

Please sign in to comment.