Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -31,9 +31,9 @@ async def execute_command(websocket, project_name, command):
|
|
31 |
# Send the command output to the client
|
32 |
output, error = process.communicate()
|
33 |
response = f"Command executed:\n\nOutput:\n{output.decode('utf-8')}\nError:\n{error.decode('utf-8')}"
|
34 |
-
|
35 |
except Exception as e:
|
36 |
-
|
37 |
|
38 |
async def create_file_structure(websocket, data, base_path='.'):
|
39 |
if data['type'] == 'folder':
|
|
|
31 |
# Send the command output to the client
|
32 |
output, error = process.communicate()
|
33 |
response = f"Command executed:\n\nOutput:\n{output.decode('utf-8')}\nError:\n{error.decode('utf-8')}"
|
34 |
+
await websocket.send(response)
|
35 |
except Exception as e:
|
36 |
+
await websocket.send(e)
|
37 |
|
38 |
async def create_file_structure(websocket, data, base_path='.'):
|
39 |
if data['type'] == 'folder':
|