mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
chore(nx/server): set proper resource dir when run from dist
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user