Skip to content

Commit d0801b7

Browse files
polish: tweak the message when .dev.vars is used (#897)
This tweaks the mssage when a `.dev.vars` file is used so that it doesn't imply that the user has to copy the values from it into their `wrangler.toml`.
1 parent 57c1354 commit d0801b7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.changeset/brave-pens-march.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
polish: tweak the message when `.dev.vars` is used
6+
7+
This tweaks the mssage when a `.dev.vars` file is used so that it doesn't imply that the user has to copy the values from it into their `wrangler.toml`.

packages/wrangler/src/__tests__/dev.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ describe("wrangler dev", () => {
658658
UNQUOTED: "unquoted value", // Note that whitespace is trimmed
659659
});
660660
expect(std.out).toMatchInlineSnapshot(
661-
`"Add vars defined in \\".dev.vars\\" to the \\"vars\\" bindings."`
661+
`"Using vars defined in .dev.vars"`
662662
);
663663
expect(std.warn).toMatchInlineSnapshot(`""`);
664664
expect(std.err).toMatchInlineSnapshot(`""`);

packages/wrangler/src/dev/dev-vars.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ export function getVarsForDev(config: Config): Config["vars"] {
2424
const devVarsPath = path.resolve(configDir, ".dev.vars");
2525
if (fs.existsSync(devVarsPath)) {
2626
const devVarsRelativePath = path.relative(process.cwd(), devVarsPath);
27-
logger.log(
28-
`Add vars defined in "${devVarsRelativePath}" to the "vars" bindings.`
29-
);
27+
logger.log(`Using vars defined in ${devVarsRelativePath}`);
3028
const devVars = dotenv.parse(fs.readFileSync(devVarsPath, "utf8"));
3129
return {
3230
...config.vars,

0 commit comments

Comments
 (0)