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:
		@@ -83,7 +83,6 @@ class Shell:
 | 
				
			|||||||
            macro.add(SetupDir())
 | 
					            macro.add(SetupDir())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        macro.add(SetupProxy())
 | 
					        macro.add(SetupProxy())
 | 
				
			||||||
        macro.add(SetupEnviron())
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if 'SSH_PRIVATE_KEY' in os.environ:
 | 
					        if 'SSH_PRIVATE_KEY' in os.environ:
 | 
				
			||||||
            macro.add(SetupSSHAgent())
 | 
					            macro.add(SetupSSHAgent())
 | 
				
			||||||
@@ -93,6 +92,8 @@ class Shell:
 | 
				
			|||||||
            macro.add(ReposCheckout())
 | 
					            macro.add(ReposCheckout())
 | 
				
			||||||
            macro.add(SetupEnviron())
 | 
					            macro.add(SetupEnviron())
 | 
				
			||||||
            macro.add(WriteConfig())
 | 
					            macro.add(WriteConfig())
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            macro.add(SetupEnviron())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Shell
 | 
					        # Shell
 | 
				
			||||||
        macro.add(SetupHome())
 | 
					        macro.add(SetupHome())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user