Refactor ripgrep tool to use ES module syntax for importing spawnSync, improving consistency with modern JavaScript practices. This change removes the CommonJS require statement, enhancing code clarity.

This commit is contained in:
sebseb7
2025-08-11 22:39:25 +02:00
parent 2de276761a
commit 8645909fd5

View File

@@ -1,3 +1,5 @@
import { spawnSync } from "node:child_process";
const virtual_chroot = '/home/seb/src/aiTools/tmp';
export default {
@@ -29,7 +31,6 @@ export async function run(args) {
rgArgs.push('--', pattern);
try {
const { spawnSync } = require('child_process');
const proc = spawnSync('rg', rgArgs, {
cwd: virtual_chroot,
encoding: 'utf8',