mirror of
				https://github.com/microsoft/autogen.git
				synced 2025-11-03 19:29:52 +00:00 
			
		
		
		
	Title: Adjust shell language switch in execute_code for Docker usage (#139)
Description: This commit modifies the conditional check in execute_code to ensure the switch to PowerShell on Windows only occurs when Docker is not being used. This keeps shell script execution consistent within a Docker container across all platforms, aligning with the function's intended behavior. Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
This commit is contained in:
		
							parent
							
								
									5510e87c0a
								
							
						
					
					
						commit
						5ff85a3feb
					
				@ -259,7 +259,7 @@ def execute_code(
 | 
			
		||||
 | 
			
		||||
    timeout = timeout or DEFAULT_TIMEOUT
 | 
			
		||||
    original_filename = filename
 | 
			
		||||
    if WIN32 and lang in ["sh", "shell"]:
 | 
			
		||||
    if WIN32 and lang in ["sh", "shell"] and (not use_docker):
 | 
			
		||||
        lang = "ps1"
 | 
			
		||||
    if filename is None:
 | 
			
		||||
        code_hash = md5(code.encode()).hexdigest()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user