Skip to content

Commit

Permalink
Prefer link to loadEnvFiles in @redwood/cli-helpers, anticipating red…
Browse files Browse the repository at this point in the history
  • Loading branch information
Philzen committed Jan 7, 2025
1 parent a516228 commit e9070a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/versioned_docs/version-8.4/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ yarn-error.log

For all the variables in your `.env` and `.env.defaults` files to make their way to `process.env`, there has to be a call to `dotenv`'s `config` function somewhere. So where is it?

It's in [the CLI](https://github.com/redwoodjs/redwood/blob/v8.4.2/packages/cli/src/lib/loadEnvFiles.js#L38-L44)—every time you run a `yarn rw` command:
It's in [the CLI](https://github.com/redwoodjs/redwood/blob/v8.4.2/packages/cli-helpers/src/lib/loadEnvFiles.ts#L35-L43)—every time you run a `yarn rw` command:

```jsx title="packages/cli/src/lib/loadEnvFiles.js"
export function loadDefaultEnvFiles(cwd) {
```ts title="packages/cli/src/lib/loadEnvFiles.js"
export function loadDefaultEnvFiles(cwd: string) {
dotenvDefaultsConfig({
path: path.join(cwd, '.env'),
defaults: path.join(cwd, '.env.defaults'),
Expand Down

0 comments on commit e9070a6

Please sign in to comment.