mozilla-aws-cli
mozilla-aws-cli copied to clipboard
In Windows, don't echo out "SET ..." commands, instead set environment variables from within Python
Since there's no easy way to eval
in cmd.exe
instead of outputting SET AWS_....
just set the environment variables inside Python (shutil.command("setx foo=bar")
).
This adds them to the global OS wise environment variable namespace. It doesn't however update the current cmd.exe that you're in.
Is this actually the right thing to do, though? I'm not certain if this is a good idea, or if we should simply tell people that only awscli
and envvar
as text output works in a cmd
terminal.
I think we can make it an option for users. We can even echo out from maws (in windows) something like "your environment has been update. this cmd.exe window however has not"
I don't think the "print something out and expect the user to copy paste it back into their console" is a path we want to offer
Yes, but that's a considerable amount of work for a small group of people clinging to an ancient subsystem. I almost think it would be better to simply say to use Powershell instead.
And even if we did do it, the best case scenario is that you have to close your existing window and open a new command window. That is pretty darned ugly.