Even when the BW_SESSION env var is set, it is not read before the portwarden program attempts to run "bw unlock" or "bw login" in order to get a session variable. This is due to the function "BWGetSessionKey()" on line 159 of cmd/portwarden/portwarden.go calling BWUnlockVaultToGetSessionKey() before even attempting to look for a session key.
There are two currently open PRs which address this:
Even when the BW_SESSION env var is set, it is not read before the portwarden program attempts to run "bw unlock" or "bw login" in order to get a session variable. This is due to the function "BWGetSessionKey()" on line 159 of cmd/portwarden/portwarden.go calling BWUnlockVaultToGetSessionKey() before even attempting to look for a session key.
There are two currently open PRs which address this:
https://github.com/vwxyzjn/portwarden/pull/44/files
https://github.com/vwxyzjn/portwarden/pull/45/files