Skip to content

Commit 521904d

Browse files
authored
make it work
1 parent 411a103 commit 521904d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,18 @@ if (!collection.includes(":")) {
6161
}
6262
console.log("resolved collection", collection);
6363

64+
if (!/^ghcr\.io\/.*?\/.*?$/.test(collection)) {
65+
throw new DOMException("Only ghcr.io things are supported right now")
66+
}
67+
6468
const devcontainerCollection = {
6569
sourceInformation: {
6670
source: "devcontainer-cli",
6771
},
6872
features: [] as any[],
6973
templates: [] as any[],
7074
};
71-
const ids = await getAllThings(collection);
75+
const ids = await getAllThings(collection.match(/^ghcr\.io\/(.*?\/.*?)$/)[1]);
7276
console.log(ids)
7377

7478
for (const id of ids) {

0 commit comments

Comments
 (0)