Environment variable interpolation

Options
fernandocarletti
fernandocarletti
Community Member

Hello!

I have a token stored in 1password and I'm trying to have it injected into another variable that holds the URL:

export MY_TOKEN=op://foo/bar/token
export MY_URL=https://the_user:$MY_TOKEN@example.com

Even though I run it with op run, 1password cannot resolve the variable inside another, resulting in https://the_user:op://foo/bar/token@example.com. I tried using the template examples, but it seems to work only with the files.

Is there a way to achieve this string interpolation?

Thank you in advance!


1Password Version: 8.7.0
Extension Version: 2.0
OS Version: 12.4

Comments

  • CalvinHP
    CalvinHP
    Community Member
    Options

    I'm trying to do the same thing with no luck, is there a way?

  • Hey all,

    Thanks for reaching out to us!
    Currently, this is not possible. With op run, the environment is parsed all at once, and sourced all at once. Adding such a feature would mean sourcing each variable as soon as they're parsed. We have an internal issue tracking this, and will make sure to update you once there's any development around this.

    Thank you for the patience!
    Best,
    Horia

This discussion has been closed.