Skip to content

Commit

Permalink
- ensure we don't lookup in root
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Nov 28, 2024
1 parent 5808485 commit 66cd029
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
11 changes: 9 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/testParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,16 @@ export async function resolvePath(
return resolvePathCache[fileName]
}

core.debug(`Resolving path for ${fileName}`)
let workspacePath: string
if (workspace.length === 0 || workspace.endsWith('/')) {
workspacePath = workspace
} else {
workspacePath = `${workspace}/`
}

core.debug(`Resolving path for ${fileName} in ${workspacePath}`)
const normalizedFilename = fileName.replace(/^\.\//, '') // strip relative prefix (./)
const globber = await glob.create(`${workspace}/**/${normalizedFilename}.*`, {
const globber = await glob.create(`${workspacePath}**/${normalizedFilename}.*`, {
followSymbolicLinks: followSymlink
})
const searchPath = globber.getSearchPaths() ? globber.getSearchPaths()[0] : ''
Expand Down

0 comments on commit 66cd029

Please sign in to comment.