From b0dd484bda0753af95b8bef7886c1ac92bf44f22 Mon Sep 17 00:00:00 2001 From: Jackson Chen <90215880+Sma1lboy@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:46:55 -0600 Subject: [PATCH] to: fix the path issue (#82) ## Summary by CodeRabbit - **Chores** - Updated workspace root path configuration to use current working directory for more reliable path resolution --- backend/src/config/common-path.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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');