Skip to content

Commit e0cd089

Browse files
committed
fix(dlx): skip cache entries with invalid metadata in listDlxCache
- Add validation to skip entries without url or timestamp - Handles legacy cache entries from older versions - Prevents undefined values in returned cache list
1 parent cde67e5 commit e0cd089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cli/src/utils/dlx/binary.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export async function listDlxCache(): Promise<
395395
const metadata = (await readJson(metaPath, {
396396
throws: false,
397397
})) as DlxMetadata | null
398-
if (!metadata) {
398+
if (!metadata || !metadata.url || !metadata.timestamp) {
399399
continue
400400
}
401401

0 commit comments

Comments
 (0)