@cloud411716/fancy-webnovel 0.1.98 → 0.1.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -169,6 +169,8 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
169
169
|
question: '🔐 安装 Chromium 需要 sudo 权限,请输入密码:',
|
|
170
170
|
hideCustomInput: false,
|
|
171
171
|
}],
|
|
172
|
+
}).then(() => {
|
|
173
|
+
notify(session, '✅ 密码已收到,正在安装...\n');
|
|
172
174
|
});
|
|
173
175
|
|
|
174
176
|
const installProc = spawn('sh', ['-c',
|
|
@@ -178,10 +180,10 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
178
180
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
179
181
|
cwd: process.cwd(),
|
|
180
182
|
});
|
|
181
|
-
const installOut = [];
|
|
183
|
+
const installOut = [], installErr = [];
|
|
182
184
|
|
|
183
185
|
installProc.stdout.on('data', d => { installOut.push(d.toString()); });
|
|
184
|
-
|
|
186
|
+
installProc.stderr.on('data', d => { installErr.push(d.toString()); });
|
|
185
187
|
|
|
186
188
|
// 注册 CTRL+C 取消处理:kill 安装进程
|
|
187
189
|
const stopCancel = onUserCancel(session, () => {
|
|
@@ -217,7 +219,8 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
217
219
|
resolve('retry');
|
|
218
220
|
} else {
|
|
219
221
|
const out = installOut.join('').slice(-300);
|
|
220
|
-
|
|
222
|
+
const err = installErr.join('').slice(-300);
|
|
223
|
+
notify(session, `❌ Chromium 安装失败(exit ${code})。\n请手动运行以下命令后重试:\n npm install -g playwright@1.40.0 --registry=https://registry.npmmirror.com && PLAYWRIGHT_DOWNLOAD_HOST=https://npmmirror.com/mirrors/playwright/ playwright install chromium --with-deps\n\nstdout末尾:\n${out}\n\nstderr末尾:\n${err}`);
|
|
221
224
|
resolve(undefined);
|
|
222
225
|
}
|
|
223
226
|
});
|