🐛 内核参数 --resident--readonly 参数解析问题 Fix https://github.com/siyuan-note/siyuan/issues/6345

This commit is contained in:
Liang Ding 2022-10-25 11:06:50 +08:00
parent f4c3be9bd0
commit ffc35d8573
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 6 additions and 6 deletions

View file

@ -538,18 +538,18 @@ const initKernel = (initData) => {
return
}
let cmd = `ui version [${appVer}], booting kernel [${kernelPath} --wd=${appDir}]`
const cmds = ['--wd', appDir]
cmds.push('--resident', 'false')
if (isDevEnv) {
cmds.push('--mode', 'dev')
cmds.push('--port', '6806')
}
if (initData) {
const initDatas = initData.split('-')
cmds.push('--workspace', initDatas[0])
cmds.push('--lang', initDatas[1])
cmd = `ui version [${appVer}], booting kernel [${kernelPath} --wd=${appDir} --workspace=${initDatas[0]} --lang=${initDatas[1]}]`
}
let cmd = `ui version [${appVer}], booting kernel [${kernelPath} ${cmds.join(' ')}]`
writeLog(cmd)
const cp = require('child_process')
const kernelProcess = cp.spawn(kernelPath,