diff options
author | Christian Hesse <mail@eworm.de> | 2020-10-07 16:04:41 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-10-08 00:06:09 +0200 |
commit | 9bd56d8aca25f84d018d423721161c9f438bfccd (patch) | |
tree | 66539e179a1e44bd204d047bf09b86c3d91f7973 /packages-update | |
parent | ffad79b8fc25b8d486a68991d8b619cf01733908 (diff) |
packages-update: improve backup failure handling
Diffstat (limited to 'packages-update')
-rw-r--r-- | packages-update | 10 |
1 files changed, 10 insertions, 0 deletions
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; + } } } |