From 9af2849ce634865ef9659a0047332686f82459a9 Mon Sep 17 00:00:00 2001 From: tsingliu <410869548@qq.com> Date: Sat, 7 Feb 2026 23:15:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/screenshot.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/screenshot.ts b/src/tools/screenshot.ts index e297268..61b5c52 100644 --- a/src/tools/screenshot.ts +++ b/src/tools/screenshot.ts @@ -2,6 +2,7 @@ import { chromium } from 'playwright'; import { ToolModule } from './interface.js'; import * as fs from 'fs'; import * as os from 'os'; +import * as child_process from 'child_process'; // Helper to check for common CJK and Emoji font paths on Linux const checkLinuxFonts = () => { @@ -26,7 +27,6 @@ const checkLinuxFonts = () => { // Also check if fc-list finds fonts (if available) - secondary check try { - const child_process = require('child_process'); const cjkOutput = child_process.execSync('fc-list :lang=zh', { stdio: 'pipe' }).toString(); const emojiOutput = child_process.execSync('fc-list :family=Emoji', { stdio: 'pipe' }).toString(); // Approximate check @@ -41,7 +41,6 @@ const checkLinuxFonts = () => { }; const installFonts = (missing: { cjk: boolean, emoji: boolean }) => { - const child_process = require('child_process'); try { let installCmd = ''; if (fs.existsSync('/etc/alpine-release')) {