Skip to content

Commit

Permalink
Title: Adjust shell language switch in execute_code for Docker usage (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
mrauter1 and LittleLittleCloud committed Oct 7, 2023
1 parent 5510e87 commit 5ff85a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogen/code_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5ff85a3

Please sign in to comment.