Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Mar 27, 2024
1 parent 895c4d4 commit db47e23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/db/src/core/integration/index.ts
Expand Up @@ -116,7 +116,7 @@ function astroDBIntegration(): AstroIntegration {
},
'astro:build:start': async ({ logger }) => {
if(!connectToStudio && !databaseFileEnvDefined() && (output === 'server' || output === 'hybrid')) {
const message = `Attempting to build without the --remote flag or the DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`;
const message = `Attempting to build without the --remote flag or the ASTRO_DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`;
const hint = 'Learn more connecting to Studio: https://docs.astro.build/en/guides/astro-db/#connect-to-astro-studio';
throw new AstroError(message, hint);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/db/src/core/integration/vite-plugin-db.ts
Expand Up @@ -118,7 +118,7 @@ import { asDrizzleTable, createLocalDatabaseClient } from ${RUNTIME_IMPORT};
${shouldSeed ? `import { seedLocal } from ${RUNTIME_IMPORT};` : ''}
${shouldSeed ? integrationSeedImportStatements.join('\n') : ''}
const dbUrl = import.meta.env.DATABASE_FILE ?? ${JSON.stringify(dbUrl)};
const dbUrl = import.meta.env.ASTRO_DATABASE_FILE ?? ${JSON.stringify(dbUrl)};
export const db = createLocalDatabaseClient({ dbUrl });
Expand Down

0 comments on commit db47e23

Please sign in to comment.