Skip to content

Commit

Permalink
fix: correct template path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed Jan 6, 2025
1 parent 8e2c51a commit 8f5da13
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/utils/registerTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ import fs from 'node:fs/promises';
import path from 'node:path';
import chalk from 'chalk';
import { calculateMD5 } from './calculateMD5.js';
import { getConfig } from './config.js';
import { fileExists } from './fileExists.js';
import { loadBuildLog } from './loadBuildLog.js';
import { saveBuildLog } from './saveBuildLog.js';

export async function registerTemplate(templatePath: string, baseDir: string): Promise<void> {
const config = await getConfig(baseDir);

// Try multiple path resolutions
const pathsToTry = [
path.join(baseDir, config.templateDir, templatePath), // In templates dir
path.resolve(templatePath),
];

let resolvedPath: string | null = null;
Expand Down

0 comments on commit 8f5da13

Please sign in to comment.