shell: Add option to keep current environment
When doing interactive development via kas shell it is often desirable to keep the user's customized configuration. The new --preserve-env argument has been added to support this scenario via an opt in flag. This flag is blocked when not running from a TTY or via kas-container and kas issues a warning to the user about potential unintended side effects when invoked. Signed-off-by: Ryan Fairfax <rfairfax@linux.microsoft.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
@@ -148,6 +148,14 @@ class SetupHome(Command):
|
||||
Sets up the home directory of kas.
|
||||
"""
|
||||
|
||||
# A list of environment variables that SETUP_HOME uses
|
||||
# This should be kept up to date with any code in execute()
|
||||
ENV_VARS = [
|
||||
'GIT_CREDENTIAL_HELPER',
|
||||
'AWS_CONFIG_FILE',
|
||||
'AWS_SHARED_CREDENTIALS_FILE',
|
||||
]
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.tmpdirname = tempfile.mkdtemp()
|
||||
|
Reference in New Issue
Block a user