fix: move state.json outside install dir to user home /var/tmp

This commit is contained in:
2026-05-22 20:39:24 +04:00
parent e39bbbcad7
commit 684976907d
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -18,10 +18,10 @@ def _state_path():
global STATE_FILE
if STATE_FILE:
return STATE_FILE
# State никогда не храним рядом со скриптом — install.sh его удалит
candidates = [
os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), ".migrate-state.json"),
os.path.join(os.path.expanduser("~"), ".migrate", "state.json"),
"/var/lib/migrate/state.json",
"/var/tmp/docker-migrate/state.json",
]
for c in candidates:
d = os.path.dirname(c)