Skip to content

Commit e44099f

Browse files
committed
address feedback
1 parent a1940b2 commit e44099f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/wrangler/src/dev.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,14 +911,14 @@ export function getBindings(
911911

912912
// Hyperdrive bindings
913913
const hyperdriveBindings = configParam.hyperdrive.map((hyperdrive) => {
914-
const desiredPrefix = `CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_`;
914+
const prefix = `CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_`;
915915
const deprecatedPrefix = `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_`;
916916

917-
let varName = `${deprecatedPrefix}${hyperdrive.binding}`;
917+
let varName = `${prefix}${hyperdrive.binding}`;
918918
let connectionStringFromEnv = process.env[varName];
919919

920920
if (!connectionStringFromEnv) {
921-
varName = `${desiredPrefix}${hyperdrive.binding}`;
921+
varName = `${deprecatedPrefix}${hyperdrive.binding}`;
922922
connectionStringFromEnv = process.env[varName];
923923
}
924924

@@ -929,7 +929,7 @@ export function getBindings(
929929
hyperdrive.localConnectionString === undefined
930930
) {
931931
throw new UserError(
932-
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the '${desiredPrefix}${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`,
932+
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the '${prefix}${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`,
933933
{ telemetryMessage: "no local hyperdrive connection string" }
934934
);
935935
}
@@ -939,7 +939,7 @@ export function getBindings(
939939
if (connectionStringFromEnv) {
940940
if (varName.startsWith(deprecatedPrefix)) {
941941
logger.once.warn(
942-
`Using "${deprecatedPrefix}<BINDING_NAME>" environment variable. This is deprecated. Please use "${desiredPrefix}<BINDING_NAME>", instead.`
942+
`Using "${deprecatedPrefix}<BINDING_NAME>" environment variable. This is deprecated. Please use "${prefix}<BINDING_NAME>" instead.`
943943
);
944944
}
945945
logger.log(

0 commit comments

Comments
 (0)