Vanessa 2023-01-06 09:55:14 +08:00
parent cdc8f4154d
commit 65e7a3fa13

View file

@ -384,7 +384,7 @@ const initKernel = (workspace, lang) => {
resolve(false)
return
}
if (isDevEnv) {
if (isDevEnv && workspaces.length === 0) {
writeLog('got kernel port [' + kernelPort + ']')
} else {
const getAvailablePort = () => {
@ -411,7 +411,7 @@ const initKernel = (workspace, lang) => {
return
}
const cmds = ['--port', kernelPort, '--wd', appDir]
if (isDevEnv) {
if (isDevEnv && workspaces.length === 0) {
cmds.push('--mode', 'dev')
}
if (workspace) {
@ -422,7 +422,7 @@ const initKernel = (workspace, lang) => {
' ')}]`
writeLog(cmd)
let kernelProcessPid = ''
if (!isDevEnv) {
if (!isDevEnv || workspaces.length > 0) {
const cp = require('child_process')
const kernelProcess = cp.spawn(kernelPath,
cmds, {