shell: Defer SetupEnviron step

If we start on a green field (only kas is available) we can't setup
the environment directly. So in this case the order is SetupProxy,
ReposFetch, ReposCheckout and then SetupEnvironment. Only if the
--keep-config-unchanged flag is provided directly go from SetupProxy
to SetupEnvironment.

Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com>
This commit is contained in:
Daniel Wagner 2018-01-08 16:50:28 +01:00
parent 415e0bf114
commit 9210fe57b4

View File

@ -83,7 +83,6 @@ class Shell:
macro.add(SetupDir())
macro.add(SetupProxy())
macro.add(SetupEnviron())
if 'SSH_PRIVATE_KEY' in os.environ:
macro.add(SetupSSHAgent())
@ -93,6 +92,8 @@ class Shell:
macro.add(ReposCheckout())
macro.add(SetupEnviron())
macro.add(WriteConfig())
else:
macro.add(SetupEnviron())
# Shell
macro.add(SetupHome())