Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
JeroenVdb
2 years agoNew Contributor
op run command doesn't have environmental variables
I created a simple case where I have an .env file that should provide an env. variable to the provided command with as value the 1Password secret + run the command with the env. variable available. But the value is just empty.
When I read the value it works perfectly.
```
$ op --version
2.26.1
$ cat prod.env
TESTING_VAR="op://Development/Foo/credential"
$ op read "op://Development/Foo/credential"
Bar
$ op run --env-file=prod.env -- echo "Output: $TESTING_VAR"
Output:
```
1Password Version: 8.10.28
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided
No RepliesBe the first to reply