Skip to content

Commit c7356ce

Browse files
committed
refactor: replace exec with execFile for ESLint execution in generate-icon script
1 parent 122cf9c commit c7356ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/generate-icon.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require('fs')
22
const path = require('path')
3-
const { exec } = require('child_process')
3+
const { execFile } = require('child_process')
44

55
// Base path relative to the current script
66
const basePath = path.resolve(__dirname, '../src')
@@ -10,7 +10,7 @@ const iconsDir = path.join(basePath, 'Assets', 'IconV2')
1010
const outputFile = path.join(basePath, 'Shared', 'Components', 'Icon', 'Icon.tsx')
1111

1212
const runESLint = (filePath) => {
13-
exec(`npx eslint ${filePath} --fix`, (error, stdout, stderr) => {
13+
execFile('npx', ['eslint', filePath, '--fix'], (error, stdout, stderr) => {
1414
if (error) {
1515
console.error(`Error running ESLint: ${error.message}`)
1616
return

0 commit comments

Comments
 (0)