Fix three findings from final clean-pass audit
- apply.sh: gate sitecustomize.py install on backup success; a failed backup cp (disk full, read-only mount) previously fell through and overwrote the vendor file with no recovery path - create_task.py: handle unexpected 2xx response schema in cmd_create; bare KeyError on result['id'] is replaced with a diagnostic print - uninstall.sh: mv inside while loop had no error handling; under set -euo pipefail a failed mv aborted the script before rm -rf PATCH_DIR, leaving the system in partial-uninstall limbo
This commit is contained in:
@@ -179,7 +179,10 @@ def cmd_create(client, args):
|
||||
}
|
||||
|
||||
result = client("POST", "/cloud_backup", body)
|
||||
print(f"Created task id={result['id']} name={result['description']!r}")
|
||||
try:
|
||||
print(f"Created task id={result['id']} name={result['description']!r}")
|
||||
except (KeyError, TypeError):
|
||||
print(f"Task created but response schema was unexpected: {result}")
|
||||
|
||||
|
||||
# ── CLI ───────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user