Skip to content

Commit

Permalink
add warn
Browse files Browse the repository at this point in the history
  • Loading branch information
peng committed Nov 17, 2023
1 parent 554017b commit c1eaefa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ async function fetchPackageJson(
if (res.status >= 200 && res.status < 300) {
return await res.json();
} else {
return new Error();
return new Error(`status: ${res.status} Get ${registry}/${packageName}/${tag} error`);
}
}

Expand All @@ -754,6 +754,9 @@ export async function validateIntegrations(integrations: string[]): Promise<Inte
} else {
const firstPartyPkgCheck = await fetchPackageJson('@astrojs', name, tag);
if (firstPartyPkgCheck instanceof Error) {
spinner.warn(
yellow(firstPartyPkgCheck.message)
);
spinner.warn(
yellow(`${bold(integration)} is not an official Astro package. Use at your own risk!`)
);
Expand Down

0 comments on commit c1eaefa

Please sign in to comment.