Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
Former Member
4 years agoUnexpected op run behavior
Hello,
I'm excited to use the new features in CLI v2, but I'm having trouble getting op run to behave as expected.
In following the https://developer.1password.com/docs/cli/secret-references ...
Former Member
4 years agoI've found that if I wrap the same curl command in a script, then the translation works as expected. Ansible environment variables have to be https://docs.ansible.com/ansible/latest/collections/ansible/builtin/env_lookup.html instead of provided at runtime with -e unless wrapped in the same way. Attempting this without the wrapper shows that the Authorization header is empty instead of either the token or a secret reference string itself.
There appears to be a nuance between referencing the variables at the command line vs those that are referenced deeper within. However, from the op run docs:
Runs the given command in a subprocess. Environment variables of the parent process are passed down to the subprocess, with all secret references replaced with their corresponding secret value.
My expectation is that a ref at command invocation should be the same as any other ref to the same variable. Is this expected behavior?
Thank you!