shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

`op plugin run -- snowsql` doesn't propagate env variables

Open yavorg opened this issue 1 year ago • 0 comments

Platform or tool

Snowflake

Desired or expected behavior

When running op plugin run -- snowsql --private-key-path ~/PATH/rsa_key.p8 --generate-jwt it should pick up exported variables from .zshrc. It looks for $SNOWSQL_PRIVATE_KEY_PASSPHRASE for the private key decryption password

Current behavior

It doesn't seem to be picking up environment variables... I have the following in .zshrc export SNOWSQL_PRIVATE_KEY_PASSPHRASE=op://VAULT/private_key_password and snowsql throws that the decrypt failed due to wrong password.

If I run op run -- snowsql -a ACCOUNT -u USER --private-key-path ~/PATH/rsa_key.p8 --generate-jwt, then it picks up the env variable just fine, but then I don't benefit from the plugin logging me in.

Relevant log output

No response

op CLI version

2.30.0

yavorg avatar Sep 26 '24 16:09 yavorg