initPromise in main.ts (#6285)

* initPromise in main.ts

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* move initPromise so dep tree doesnt shit the bed

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2025-04-11 11:17:46 -07:00
committed by GitHub
parent 319c60d4fa
commit c0aa763c3b
32 changed files with 123 additions and 72 deletions

View File

@ -28,6 +28,7 @@ import {
getPathOrUrlFromArgs,
parseCLIArgs,
} from '@src/commandLineArgs'
import { initPromiseNode } from '@src/lang/wasmUtilsNode'
import { ZOO_STUDIO_PROTOCOL } from '@src/lib/constants'
import getCurrentProjectFile from '@src/lib/getCurrentProjectFile'
import { reportRejection } from '@src/lib/trap'
@ -512,6 +513,7 @@ app.on('ready', () => {
const getProjectPathAtStartup = async (
filePath?: string
): Promise<string | null> => {
await initPromiseNode
// If we are in development mode, we don't want to load a project at
// startup.
// Since the args passed are always '.'