From fe43513a49d9d19dd50a64e056e9f5be2451bb14 Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 16:58:55 +0000 Subject: [PATCH] Automated commit --- src/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 58d38b6..23b0827 100644 --- a/src/main.py +++ b/src/main.py @@ -19,7 +19,10 @@ def run_bash_file_from_string(s: str): """Runs a bash script from a string""" with open('temp.sh', 'w') as f: f.write(s) - os.system('bash temp.sh') + if os.name == 'nt': # Windows systems + os.system('powershell.exe .\\temp.sh') + else: # Unix/Linux systems + os.system('bash temp.sh') os.remove('temp.sh')