diff options
Diffstat (limited to 'packages/core/src')
| -rw-r--r-- | packages/core/src/core/loggingContentGenerator.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/core/src/core/loggingContentGenerator.ts b/packages/core/src/core/loggingContentGenerator.ts index 3c1feb62..7cf20a66 100644 --- a/packages/core/src/core/loggingContentGenerator.ts +++ b/packages/core/src/core/loggingContentGenerator.ts @@ -30,7 +30,7 @@ import { import { ContentGenerator } from './contentGenerator.js'; import { toContents } from '../code_assist/converter.js'; import { isStructuredError } from '../utils/quotaErrorDetection.js'; -import { ExecException } from 'child_process'; +import { ExecException, exec } from 'child_process'; interface StructuredError { status: number; @@ -119,7 +119,6 @@ export class LoggingContentGenerator implements ContentGenerator { const jsonPayload = JSON.stringify(req, null, 2); fs.writeFileSync(filePath, jsonPayload); this.requestCounter++; - const { exec } = require('child_process'); exec(`regex --json ${filePath}`, (error: ExecException | null, stdout: string, stderr: string) => { if (error) { console.error(`exec error: ${error}`); @@ -157,7 +156,6 @@ export class LoggingContentGenerator implements ContentGenerator { const jsonPayload = JSON.stringify(req, null, 2); fs.writeFileSync(filePath, jsonPayload); this.requestCounter++; - const { exec } = require('child_process'); exec(`regex --json ${filePath}`, (error: ExecException | null, stdout: string, stderr: string) => { if (error) { console.error(`exec error: ${error}`); |
