From b6bf557f352c72da155aa6523e007305e49393bb Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Tue, 18 Apr 2023 01:51:14 +0700 Subject: [PATCH] add force push --- vestasync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vestasync.py b/vestasync.py index 32d8096..d0d7bda 100755 --- a/vestasync.py +++ b/vestasync.py @@ -221,7 +221,7 @@ def ppush_the_repo(c): print("Nothing to commit, exit") else: print(f"Error: {e.result.stderr}") - c.run('cd /mnt/data/etc/ && git push -u origin master', hide=True) + c.run('cd /mnt/data/etc/ && git push --force -u origin master', hide=True) def run_user_cmd(c, file): user_cmd_file = "/tmp/user_cmd.sh" @@ -259,6 +259,7 @@ def device_update(c): create_autogit_systemd(c) if args.user_cmd is not None: run_user_cmd(c, args.user_cmd_file) + ppush_the_repo(c) print("Update vestasync complete\n") def device_install(c): @@ -316,6 +317,7 @@ def device_restore(): mark_original_restored(c, "restored") if args.user_cmd is not None: run_user_cmd(c, args.user_cmd_file) + ppush_the_repo(c) reboot(c) print(f"Restore backup complete (hostname {hostname}), rebooting target device..\n") except socket.timeout: