diff --git a/packages/astro-d2/libs/d2.ts b/packages/astro-d2/libs/d2.ts index 02a5684..af47f19 100644 --- a/packages/astro-d2/libs/d2.ts +++ b/packages/astro-d2/libs/d2.ts @@ -85,7 +85,7 @@ async function getD2Version() { try { const [version] = await exec('d2', ['--version']) - if (!version || !/^\d+\.\d+\.\d+$/.test(version)) { + if (!version || !/^v?\d+\.\d+\.\d+/.test(version)) { throw new Error(`Invalid D2 version, got '${version}'.`) }