From 1fec4a6eb986011d4d6d998410ff9b6144c28c34 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Thu, 16 May 2024 18:10:59 +0200 Subject: [PATCH] fix: use astro cli command instead of astro db's (#11070) * fix: use astro cli command instead of astro db's * chore: changeset --- .changeset/metal-rocks-design.md | 5 +++++ packages/db/src/core/cli/commands/link/index.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/metal-rocks-design.md diff --git a/.changeset/metal-rocks-design.md b/.changeset/metal-rocks-design.md new file mode 100644 index 0000000000..615259f5e5 --- /dev/null +++ b/.changeset/metal-rocks-design.md @@ -0,0 +1,5 @@ +--- +"@astrojs/db": patch +--- + +Fixes some error messages not using the proper command to login or sync the project diff --git a/packages/db/src/core/cli/commands/link/index.ts b/packages/db/src/core/cli/commands/link/index.ts index e0498f9c4b..52e4b2f2e5 100644 --- a/packages/db/src/core/cli/commands/link/index.ts +++ b/packages/db/src/core/cli/commands/link/index.ts @@ -67,7 +67,7 @@ async function getWorkspaceId(): Promise { if (res.status === 401) { throw new Error( `${bgRed('Unauthorized')}\n\n Are you logged in?\n Run ${cyan( - 'astro db login' + 'astro login' )} to authenticate and then try linking again.\n\n` ); } @@ -115,7 +115,7 @@ export async function createNewProject({ if (res.status === 401) { console.error( `${bgRed('Unauthorized')}\n\n Are you logged in?\n Run ${cyan( - 'astro db login' + 'astro login' )} to authenticate and then try linking again.\n\n` ); process.exit(1); @@ -149,7 +149,7 @@ export async function promptExistingProjectName({ workspaceId }: { workspaceId: if (res.status === 401) { console.error( `${bgRed('Unauthorized')}\n\n Are you logged in?\n Run ${cyan( - 'astro db login' + 'astro login' )} to authenticate and then try linking again.\n\n` ); process.exit(1);