Forum Discussion

JeroenVdb's avatar
JeroenVdb
New Contributor
2 years ago

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