Skip to content

Commit

Permalink
Adding some clarification on how the -c flag can be used (#79)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gunhaxxor authored Nov 29, 2022
1 parent 9d2bd7e commit 032a66e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ $ dotenv -e .env3 -e .env4 <command with arguments>
Some applications load from `.env`, `.env.development`, `.env.local`, and `.env.development.local`
(see [#37](https://github.com/entropitor/dotenv-cli/issues/37) for more information).
`dotenv-cli` supports this using the `-c` flag for just `.env` and `.env.local` and `-c development` for the ones above.
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`):
```bash
dotenv -e ../.env -c
```

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

0 comments on commit 032a66e

Please sign in to comment.