diff --git a/packages/create-astro/src/actions/context.ts b/packages/create-astro/src/actions/context.ts index 3693ad0c50a2..fdcbbb7a32bd 100644 --- a/packages/create-astro/src/actions/context.ts +++ b/packages/create-astro/src/actions/context.ts @@ -34,9 +34,12 @@ export interface Context { } export async function getContext(argv: string[]): Promise { - const packageSpecifier = argv.find((argItem) => /^(astro|create-astro)@/.exec(argItem))?.split('@')[1]; + const packageSpecifier = argv + .find((argItem) => /^(astro|create-astro)@/.exec(argItem)) + ?.split('@')[1]; // Fallback to 'latest' if it's a version number - const packageTag = packageSpecifier && /^v?\d[^a-zA-Z]*$/.test(packageSpecifier) ? 'latest' : packageSpecifier; + const packageTag = + packageSpecifier && /^v?\d[^a-zA-Z]*$/.test(packageSpecifier) ? 'latest' : packageSpecifier; const flags = arg( {