fix(server): run on non-Windows python (#94)
This commit is contained in:
@@ -88,8 +88,19 @@ def execute_command():
|
||||
|
||||
# Execute the command without any safety checks.
|
||||
try:
|
||||
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=shell, text=True,
|
||||
timeout=120, creationflags=subprocess.CREATE_NO_WINDOW)
|
||||
if platform_name == "Windows":
|
||||
flags = subprocess.CREATE_NO_WINDOW
|
||||
else:
|
||||
flags = 0
|
||||
result = subprocess.run(
|
||||
command,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
shell=shell,
|
||||
text=True,
|
||||
timeout=120,
|
||||
creationflags=flags,
|
||||
)
|
||||
return jsonify({
|
||||
'status': 'success',
|
||||
'output': result.stdout,
|
||||
|
||||
Reference in New Issue
Block a user