From 9bd56d8aca25f84d018d423721161c9f438bfccd Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 7 Oct 2020 16:04:41 +0200 Subject: packages-update: improve backup failure handling --- packages-update | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages-update') diff --git a/packages-update b/packages-update index 8e18e77..7c88eac 100644 --- a/packages-update +++ b/packages-update @@ -55,6 +55,16 @@ $ScriptLock "packages-update"; / system script run $Script; } on-error={ $LogPrintExit warning ("Running backup script " . $ScriptName . " before update failed!") false; + :if ([ $ScriptFromTerminal "packages-update" ] = true) do={ + :put "Do you want to continue anyway? [y/N]"; + :if (([ :terminal inkey timeout=60 ] % 32) = 25) do={ + $LogPrintExit info ("User requested to continue anyway.") false; + } else={ + $LogPrintExit info ("Canceled update...") true; + } + } else={ + $LogPrintExit info ("Canceled non-interactive update.") true; + } } } -- cgit v1.2.3-70-g09d2