Explore using pexec to spawn a subshell instead of making the user invoke $(maws)
gene1wood opened this issue · 0 comments
Currently we require users to execute maws in a subshell (with a command like $(maws)
) and then execute the output from that subshell (which outputs something like source /tmp/foo.tmp
).
This is good because the user ends up in the same shell they were in before, but now they have environment variables set enabling access to AWS.
Should we change to the model that hatch
uses which spawns a subshell and then controls it using pexec
Here's how hatch does it
This would have the benefit of no longer requiring the user to invoke maws with a weird syntax like $(maws)
. The downside would be that the user ends up in a subshell in which they interact with AWS.
Then again, maybe the fact that they're in a subshell with AWS access isn't a downside, not sure.
Additionally we could add this functionality and have this be an optional way to interact with maws
, supporting the existing method and this new one.