Skip to content

Commit 032a66e

Browse files
authored
Adding some clarification on how the -c flag can be used (#79)
* Explain how the -c flag works in tandem with the -e flag Explain that the cascade flag can be used together with the -e flag to parse env files from another folder. * Fixed typo
1 parent 9d2bd7e commit 032a66e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ $ dotenv -e .env3 -e .env4 <command with arguments>
4040
Some applications load from `.env`, `.env.development`, `.env.local`, and `.env.development.local`
4141
(see [#37](https://github.com/entropitor/dotenv-cli/issues/37) for more information).
4242
`dotenv-cli` supports this using the `-c` flag for just `.env` and `.env.local` and `-c development` for the ones above.
43+
The `-c` flag can be used together with the `-e` flag. The following example will cascade env files located one folder up in the directory tree (`../.env` followed by `../.env.local`):
44+
```bash
45+
dotenv -e ../.env -c
46+
```
4347

4448
### Setting variable from command line
4549
It is possible to set variable directly from command line using the -v flag:

0 commit comments

Comments
 (0)