Skip to content

Commit

Permalink
relativize path
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed May 31, 2024
1 parent 66497c4 commit c76e50c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/promptrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function resolveExpansionVars(
) {
const { file } = frag
const project = file.project
const root = host.projectFolder()

const files: WorkspaceFile[] = []
const fr = frag
Expand All @@ -37,7 +38,9 @@ async function resolveExpansionVars(
const filenames = await expandFiles(
referenceFiles?.length ? referenceFiles : templateFiles
)
for (const filename of filenames) {
for (let filename of filenames) {
filename = relativePath(root, filename)

if (files.find((lk) => lk.filename === filename)) continue
const file: WorkspaceFile = { filename }
await resolveFileContent(file)
Expand Down

0 comments on commit c76e50c

Please sign in to comment.