Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use astro cli command instead of astro db's #11070

Merged
merged 3 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading