Skip to content

Commit 0b010d5

Browse files
authored
fix: correctly handle inputs containing mixed dirs and databaseUrls files (#759)
1 parent e241a58 commit 0b010d5

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/merge-reports/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ export const mergeReports = async (toolAdapter: ToolAdapter, srcPaths: string[],
5353

5454
await fs.ensureDir(destPath);
5555

56-
// Adding these to resolvedUrls, because they are not returned by tryResolveUrls, it returns only nested json urls
57-
const topLevelLocalJsonPaths = srcPaths.filter(url => !isUrl(url)).map(u => path.join(u, DATABASE_URLS_JSON_NAME));
58-
const localSrcReportPaths = _.uniq([...resolvedUrls, ...topLevelLocalJsonPaths]
59-
.filter(url => !isUrl(url))
60-
.map(localPathOfDbOrJson => path.resolve(process.cwd(), path.parse(localPathOfDbOrJson).dir))
56+
const localSrcReportPaths = _.uniq([...resolvedUrls, ...srcPaths]
57+
.filter(srcPath => !isUrl(srcPath))
58+
.map(localPath => path.resolve(process.cwd(), path.extname(localPath) ? path.dirname(localPath) : localPath))
6159
);
6260

6361
if (!_.isEmpty(localSrcReportPaths)) {

0 commit comments

Comments
 (0)