diff --git a/backend/src/config/common-path.ts b/backend/src/config/common-path.ts index 6f40ab2..59c7bf6 100644 --- a/backend/src/config/common-path.ts +++ b/backend/src/config/common-path.ts @@ -1,10 +1,10 @@ import * as path from 'path'; import { existsSync, mkdirSync, promises } from 'fs-extra'; - +import { cwd } from 'process'; // Constants for base directories const APP_NAME = 'codefox'; // TODO: hack way to get the root directory of the workspace -const WORKSPACE_ROOT = path.resolve(__dirname, '../../../'); +const WORKSPACE_ROOT = path.resolve(cwd(), '../'); const ROOT_DIR = path.join(WORKSPACE_ROOT, `.${APP_NAME}`); export const TEMPLATE_PATH = path.join(WORKSPACE_ROOT, 'backend/template');