chore(nx/server): set proper resource dir when run from dist

This commit is contained in:
Elian Doran
2025-04-24 16:08:02 +03:00
parent aa68c705f0
commit aab545b82e
2 changed files with 5 additions and 1 deletions

View File

@@ -290,6 +290,10 @@ export function envToBoolean(val: string | undefined) {
* @returns the resource dir.
*/
export function getResourceDir() {
if (process.env.TRILIUM_RESOURCE_DIR) {
return process.env.TRILIUM_RESOURCE_DIR;
}
if (isElectron && !isDev) return process.resourcesPath;
if (!isDev) {
return path.dirname(process.argv[1]);