Skip to content

Commit

Permalink
chore: update readme for new option
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrul committed Mar 10, 2021
1 parent 65d2198 commit 5917041
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -67,7 +67,8 @@ Options:
--silent Ignore any env-cmd errors and only fail on executed program failure.
--use-shell Execute the command in a new shell with the given environment
--verbose Print helpful debugging information
-x, --expand-envs Replace $var in args and command with environment variables
-x, --expand-envs Replace $var and ${var} in args and command with environment variables
--recursive Replace $var and ${var} in env file with the referenced environment variable
-h, --help output usage information
```

Expand Down Expand Up @@ -130,14 +131,14 @@ commands together that share the same environment variables.
```

### Asynchronous env file support

EnvCmd supports reading from asynchronous `.env` files. Instead of using a `.env` file, pass in a `.js`
file that exports either an object or a `Promise` resolving to an object (`{ ENV_VAR_NAME: value, ... }`). Asynchronous `.rc`
files are also supported using `.js` file extension and resolving to an object with top level environment
names (`{ production: { ENV_VAR_NAME: value, ... } }`).

**Terminal**

```sh
./node_modules/.bin/env-cmd -f ./async-file.js node index.js
```
Expand Down

0 comments on commit 5917041

Please sign in to comment.