bunite-core 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/host/paths.ts +6 -2
package/package.json
CHANGED
package/src/host/paths.ts
CHANGED
|
@@ -105,10 +105,14 @@ function resolveCefDir(searchDirs: string[]): string | null {
|
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
/** Entry
|
|
108
|
+
/** Entry-script dir (dev) or real exe dir (compiled binary). */
|
|
109
109
|
export function getBaseDir(): string {
|
|
110
110
|
const main = Bun.main;
|
|
111
|
-
|
|
111
|
+
// Compiled standalone: Bun.main is a virtual embedded-fs path (win `B:/~BUN/…`,
|
|
112
|
+
// posix `/$bunfs/…`) for which existsSync() returns true — so it can't gate the
|
|
113
|
+
// dev branch. Detect the virtual root and use the real executable dir instead.
|
|
114
|
+
const compiled = main.includes("~BUN") || main.includes("$bunfs");
|
|
115
|
+
if (!compiled && main && existsSync(main)) return dirname(main);
|
|
112
116
|
return dirname(process.execPath);
|
|
113
117
|
}
|
|
114
118
|
|