diff --git a/.changeset/thin-clocks-fail.md b/.changeset/thin-clocks-fail.md new file mode 100644 index 0000000..e67130b --- /dev/null +++ b/.changeset/thin-clocks-fail.md @@ -0,0 +1,5 @@ +--- +"@t1mmen/srtd": patch +--- + +fix `register` template path resolution diff --git a/src/utils/registerTemplate.ts b/src/utils/registerTemplate.ts index 1314146..f755537 100644 --- a/src/utils/registerTemplate.ts +++ b/src/utils/registerTemplate.ts @@ -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 { - 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;