Skip to content

Commit

Permalink
fix: use astro cli command instead of astro db's (#11070)
Browse files Browse the repository at this point in the history
* fix: use astro cli command instead of astro db's

* chore: changeset
  • Loading branch information
Princesseuh authored May 16, 2024
1 parent 9332bb1 commit 1fec4a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-rocks-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/db": patch
---

Fixes some error messages not using the proper command to login or sync the project
6 changes: 3 additions & 3 deletions packages/db/src/core/cli/commands/link/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function getWorkspaceId(): Promise<string> {
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`
);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1fec4a6

Please sign in to comment.