Skip to content

Commit f25b4fa

Browse files
committed
fix: validate authenticity for deno examples
1 parent e8527e5 commit f25b4fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/create-commandkit/src/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,10 @@ export async function fetchAvailableExamples(): Promise<string[]> {
144144
}
145145

146146
export function isDenoProject(example: string): boolean {
147+
const isOfficial = isOfficialExample(example);
148+
// if it's not an official example, we can assume it's not a Deno project
149+
// the user may use --use-deno to force a Deno project
150+
if (!isOfficial) return false;
151+
147152
return example.startsWith('deno-') || example.startsWith('with-deno-');
148153
}

0 commit comments

Comments
 (0)