Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,11 +40,10 @@ def run_capture(cmd):
|
|
| 40 |
"""Run a command and return stdout; raise RuntimeError with readable stderr on failure."""
|
| 41 |
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 42 |
if result.returncode != 0:
|
| 43 |
-
stderr_text = result.stderr or ""
|
| 44 |
-
# Keep only tail to avoid massive logs
|
| 45 |
tail = stderr_text[-2000:]
|
| 46 |
-
|
| 47 |
-
" + tail)
|
| 48 |
return result.stdout
|
| 49 |
|
| 50 |
|
|
|
|
| 40 |
"""Run a command and return stdout; raise RuntimeError with readable stderr on failure."""
|
| 41 |
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
| 42 |
if result.returncode != 0:
|
| 43 |
+
stderr_text = result.stderr or "" # Keep only tail to avoid massive logs
|
|
|
|
| 44 |
tail = stderr_text[-2000:]
|
| 45 |
+
# KORRIGIERTE ZEILE:
|
| 46 |
+
raise RuntimeError("Command failed: " + " ".join(cmd) + " " + tail)
|
| 47 |
return result.stdout
|
| 48 |
|
| 49 |
|