Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
br8dy
4 years agoNew Contributor
cli 2.7.1 run command with arguments
I'm no able to pass a variable value as a parameter to a op run command.
Example script:
export TOKEN="op://correct/refernece/path"
op run --no-masking -- terminus auth:login --email exa...
andi_t_1P
1Password Team
4 years agoHi br8dy , please do try op run --no-masking -- sh -c 'terminus auth:login --email example@email.com --machine-token $TOKEN'. This will work as expected. What is happening in your case I believe is that the TOKEN gets evaluated before the terminus command is executed as a subprocess of op run. I will make sure we update the documentation to reflect this unintuitive use case.
All the best,
Andi