Skip to content

Commit 18f80fb

Browse files
committed
Revert "Recognize pwsh.exe as a valid parent process on Windows."
This reverts commit 2bda5e9.
1 parent 60f05fd commit 18f80fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

aider/run_cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_windows_parent_process_name():
3131
if parent is None:
3232
break
3333
parent_name = parent.name().lower()
34-
if parent_name in ["pwsh.exe", "powershell.exe", "cmd.exe"]:
34+
if parent_name in ["powershell.exe", "cmd.exe"]:
3535
return parent_name
3636
current_process = parent
3737
return None
@@ -50,7 +50,7 @@ def run_cmd_subprocess(command, verbose=False, cwd=None, encoding=sys.stdout.enc
5050
# Determine the appropriate shell
5151
if platform.system() == "Windows":
5252
parent_process = get_windows_parent_process_name()
53-
if parent_process in ["pwsh.exe", "powershell.exe"]:
53+
if parent_process == "powershell.exe":
5454
command = f"powershell -Command {command}"
5555

5656
if verbose:

0 commit comments

Comments
 (0)