Skip to content

Commit

Permalink
Fix .env file example in docs (#9064)
Browse files Browse the repository at this point in the history
## Summary

The current example is broken since `$MY_ENV_VAR` gets evaluated by the
shell.
  • Loading branch information
charliermarsh authored Nov 12, 2024
1 parent 720a477 commit 8ed37ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/configuration/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ the `--env-file` flag to `uv run`.
For example, to load environment variables from a `.env` file in the current working directory:

```console
$ uv run --env-file .env -- echo $MY_ENV_VAR
$ echo "MY_VAR='Hello, world!'" > .env
$ uv run --env-file .env -- python -c 'import os; print(os.getenv("MY_VAR"))'
Hello, world!
```

The `--env-file` flag can be provided multiple times, with subsequent files overriding values
Expand Down

0 comments on commit 8ed37ee

Please sign in to comment.