99designs / aws-vault

A vault for securely storing and accessing AWS credentials in development environments
MIT License
8.52k stars 820 forks source link

How to preserve previous session after running `exec` #1197

Closed Glyphack closed 1 year ago

Glyphack commented 1 year ago

I have a question about how do you preserve the previous shell after running exec command. I understand that exec creates a subshell, and if I have a python virtual env activated it will be deactivated in the subshell.

Here's an example:

❯ which python
/Users/glyphack/.virtualenvs/data-products-infra/bin/python

❯ aws-vault exec bren-sa-na-prod
Starting subshell /usr/local/bin/fish, use `exit` to exit the subshell

❯ which python
/Users/glyphack/.pyenv/shims/python

Could you provide some resources on how can I change my config so that the virtual env is kept activated?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.