Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Explore using pexec to spawn a subshell instead of making the user invoke $(maws) #254

Open
gene1wood opened this issue Mar 25, 2023 · 0 comments

Comments

@gene1wood
Copy link
Contributor

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

https://github.com/pypa/hatch/blob/63b692e3ac7c4156edbbf382b849eaa8707607eb/src/hatch/utils/shells.py#L97-L128

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant