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:
mrauter1
2023-10-07 10:29:52 -03:00
committed by GitHub
parent 5510e87c0a
commit 5ff85a3feb

View File

@@ -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()