1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Make sure top level path is resolved correctly.

This commit is contained in:
mike12345567 2023-06-07 16:37:42 +01:00
parent 9ebd90a07d
commit 8d7119a363
2 changed files with 4 additions and 3 deletions

View file

@ -98,7 +98,8 @@ const environment = {
isInThread: () => {
return process.env.FORKED_PROCESS
},
TOP_LEVEL_PATH: process.env.TOP_LEVEL_PATH || process.env.SERVER_TOP_LEVEL_PATH,
TOP_LEVEL_PATH:
process.env.TOP_LEVEL_PATH || process.env.SERVER_TOP_LEVEL_PATH,
}
// threading can cause memory issues with node-ts in development

View file

@ -1,14 +1,14 @@
import { PathLike } from "fs"
import fs from "fs"
import { budibaseTempDir } from "../budibaseDir"
import { join } from "path"
import { resolve, join } from "path"
import env from "../../environment"
import tar from "tar"
import environment from "../../environment"
const uuid = require("uuid/v4")
export const TOP_LEVEL_PATH =
environment.TOP_LEVEL_PATH || join(__dirname, "..", "..", "..")
environment.TOP_LEVEL_PATH || resolve(join(__dirname, "..", "..", ".."))
/**
* Upon first startup of instance there may not be everything we need in tmp directory, set it up.