mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 20:42:02 +00:00
fix(powershell): remove platform-specific execution (#7675)
This commit is contained in:
committed by
Pepe Fagoaga
parent
8817d08a92
commit
af6b0833a1
@@ -1,5 +1,4 @@
|
||||
import json
|
||||
import platform
|
||||
import queue
|
||||
import re
|
||||
import subprocess
|
||||
@@ -47,12 +46,7 @@ class PowerShellSession:
|
||||
This is a base implementation that should be extended by subclasses
|
||||
to add specific initialization logic (e.g., credential setup).
|
||||
"""
|
||||
# Determine the appropriate PowerShell command based on the OS
|
||||
if platform.system() == "Windows":
|
||||
powershell_cmd = "powershell"
|
||||
else:
|
||||
powershell_cmd = "pwsh"
|
||||
|
||||
powershell_cmd = "pwsh"
|
||||
self.process = subprocess.Popen(
|
||||
[powershell_cmd, "-NoExit", "-Command", "-"],
|
||||
stdin=subprocess.PIPE,
|
||||
|
||||
Reference in New Issue
Block a user