profile fix fit

This commit is contained in:
DaKheera47 2026-01-21 15:38:00 +00:00
parent 77f7927e77
commit f445f15336
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const DEFAULT_PROFILE_PATH = join(__dirname, '../../../../resume-generator/base.json');
const DEFAULT_PROFILE_PATH = process.env.RESUME_PROFILE_PATH || join(__dirname, '../../../../resume-generator/base.json');
let cachedProfile: any = null;
let cachedProfilePath: string | null = null;

View File

@ -15,7 +15,7 @@ type ResumeProjectSelectionItem = ResumeProjectCatalogItem & { summaryText: stri
export async function loadResumeProfile(profilePath: string = DEFAULT_RESUME_PROFILE_PATH): Promise<unknown> {
if (profilePath === DEFAULT_RESUME_PROFILE_PATH) {
return getProfile();
return getProfile(profilePath);
}
const content = await readFile(profilePath, 'utf-8');
return JSON.parse(content) as unknown;