@cloud411716/fancy-webnovel 0.1.95 → 0.1.97
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
|
@@ -167,6 +167,7 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
167
167
|
], {
|
|
168
168
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
169
169
|
cwd: process.cwd(),
|
|
170
|
+
setsid: true, // 创建新 session,无 controlling TTY,sudo 密码不会跑到输入框
|
|
170
171
|
});
|
|
171
172
|
const installOut = [];
|
|
172
173
|
|
|
@@ -180,8 +181,8 @@ async function runScanWithChromiumFix(ctx, session, invocation, { platform, leng
|
|
|
180
181
|
});
|
|
181
182
|
|
|
182
183
|
let sudoDialogPromise = null;
|
|
183
|
-
//
|
|
184
|
-
installProc.
|
|
184
|
+
// sudo 密码提示走 stdout,不是 stderr
|
|
185
|
+
installProc.stdout.on('data', async (d) => {
|
|
185
186
|
if (sudoDialogPromise) return;
|
|
186
187
|
const text = d.toString();
|
|
187
188
|
if (/password|密码|sudo/i.test(text)) {
|