Forum Discussion

Former Member's avatar
Former Member
2 years ago
Solved

Can we get ~ expansion for --env-file in op run?

I'd prefer to be able to use op run --env-file="~/envs/example.env" to op run --env-file="/Users/me/envs/example.env" but right now I get


[ERROR] 2023/12/07 11:43:47 open ~/envs/example.env: no such file or directory

I know I can use $HOME but tilde expansion feels pretty natural for a CLI tool.

Thanks!


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: current OSX
Browser: Not Provided

  • 1P_Phil's avatar
    1P_Phil
    4 months ago

    Hi watford-ep​ ,

    Thanks for bringing this up. I just confirmed this is still an issue and I'll feed it along to the team.  Also if there are other things still on your mind, please let us know and I will help get them re-brought up to the team.

    Thanks! Phil

2 Replies

  • watford-ep's avatar
    watford-ep
    New Contributor

    Still an issue:

    ❯ AWS_PROFILE=abc123 op run --env-file=~/.op.env -- tofu plan
    [ERROR] 2025/07/16 13:43:55 open ~/.op.env: no such file or directory

    1Password Version: 2.31.1
    Extension Version: N/A
    OS Version: macOS Sequoia 15.5 (24F74)

    • 1P_Phil's avatar
      1P_Phil
      Icon for Moderator rankModerator

      Hi watford-ep​ ,

      Thanks for bringing this up. I just confirmed this is still an issue and I'll feed it along to the team.  Also if there are other things still on your mind, please let us know and I will help get them re-brought up to the team.

      Thanks! Phil