mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-18 06:20:29 +00:00
Pass CLI args to worker and update login script example
The quickLoginExample.bat script was updated to use the new launcher script names and argument format. In napcat.ts, the master process now forwards its command line arguments to the worker process, enabling better parameter handling.
This commit is contained in:
parent
d4478275ee
commit
0ba5862753
@ -3,5 +3,5 @@ REM 快速登录示例脚本
|
||||
REM -q 参数是可选的,不传则使用二维码登录
|
||||
REM
|
||||
REM 使用方法(删掉对应系统那行的 REM):
|
||||
REM ./launcher.bat -q 123456
|
||||
REM ./launcher-win10.bat -q 123456
|
||||
REM ./launcher-user.bat 123456
|
||||
REM ./launcher-win10-user.bat 123456
|
||||
|
||||
@ -151,7 +151,8 @@ async function startWorker (): Promise<void> {
|
||||
const workerScript = getWorkerScriptPath();
|
||||
const processType = getProcessTypeName();
|
||||
|
||||
const child = processManager.createWorker(workerScript, [], {
|
||||
// 传递 master 进程的命令行参数给 worker 进程
|
||||
const child = processManager.createWorker(workerScript, process.argv.slice(2), {
|
||||
env: {
|
||||
...process.env,
|
||||
NAPCAT_WORKER_PROCESS: '1',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user