🎨 开发环境(dev 模式)不再强制使用 6806 端口

This commit is contained in:
Liang Ding 2023-01-06 10:08:29 +08:00
parent f8c92bf62f
commit a7de45d70d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -382,9 +382,8 @@ const initKernel = (workspace, lang) => {
resolve(false)
return
}
if (isDevEnv && workspaces.length === 0) {
writeLog('got kernel port [' + kernelPort + ']')
} else {
if (!isDevEnv || workspaces.length > 0) {
const getAvailablePort = () => {
// https://gist.github.com/mikeal/1840641
return new Promise((portResolve, portReject) => {