fix: complete logic audit — mark_completed on transfer, reset_state for interactive source, proper error propagation, user-visible commands

This commit is contained in:
2026-05-22 21:05:16 +04:00
parent 97b3623915
commit addbb3795f
5 changed files with 11 additions and 5 deletions
+4 -3
View File
@@ -329,9 +329,10 @@ def do_transfer_offer():
key_path = None
try:
key_path = pick_or_setup_ssh_key(host, user, port_int)
except RuntimeError:
# pick_or_setup уже дал инструкции, останавливаемся
return
except RuntimeError as exc:
# pick_or_setup уже дал инструкции, помечаем ошибку и выходим
state.set_error("ssh_key_setup", "", str(exc), suggestion="Настройте SSH-ключ и запустите: docker-migrate --resume")
raise
if key_path:
state.set_stage("TRANSFER", target_host=host, target_user=user, target_port=port_int, ssh_key=key_path)