Fix dotenv-load documentation (#1104)
This commit is contained in:
parent
4cb5c30290
commit
57d47fe59a
@ -563,7 +563,7 @@ bar
|
|||||||
|
|
||||||
#### Dotenv Load
|
#### Dotenv Load
|
||||||
|
|
||||||
If `dotenv-load` is `true`, a `.env` file will be loaded if present. Defaults to `true`.
|
If `dotenv-load` is `true`, a `.env` file will be loaded if present. Defaults to `false`.
|
||||||
|
|
||||||
#### Export
|
#### Export
|
||||||
|
|
||||||
@ -702,7 +702,7 @@ Available recipes:
|
|||||||
|
|
||||||
### Dotenv Integration
|
### Dotenv Integration
|
||||||
|
|
||||||
`just` will load environment variables from a file named `.env`. This file can be located in the same directory as your `justfile` or in a parent directory. These variables are environment variables, not `just` variables, and so must be accessed using `$VARIABLE_NAME` in recipes and backticks.
|
If `dotenv-load` is set to `true`, `just` will load environment variables from a file named `.env`. This file can be located in the same directory as your `justfile` or in a parent directory. These variables are environment variables, not `just` variables, and so must be accessed using `$VARIABLE_NAME` in recipes and backticks.
|
||||||
|
|
||||||
For example, if your `.env` file contains:
|
For example, if your `.env` file contains:
|
||||||
|
|
||||||
@ -715,6 +715,8 @@ SERVER_PORT=1337
|
|||||||
And your `justfile` contains:
|
And your `justfile` contains:
|
||||||
|
|
||||||
```make
|
```make
|
||||||
|
set dotenv-load
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
@echo "Starting server with database $DATABASE_ADDRESS on port $SERVER_PORT…"
|
@echo "Starting server with database $DATABASE_ADDRESS on port $SERVER_PORT…"
|
||||||
./server --database $DATABASE_ADDRESS --port $SERVER_PORT
|
./server --database $DATABASE_ADDRESS --port $SERVER_PORT
|
||||||
|
Loading…
Reference in New Issue
Block a user