Skip to content

Commit

Permalink
feat: added --check option to run through update checks and exit
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Jul 1, 2023
1 parent 722c956 commit ac0523b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ublue-update
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,27 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--force", action="store_true",
help="force manual update, skipping update checks")
parser.add_argument("-c", "--check", action="store_true",
help="run update checks and exit")
args = parser.parse_args()

if dbus_notify:
notify2.init('ublue-update')

if not args.force:
check_inhibitors()

# system checks passed
if dbus_notify:
log.info("System passed all update checks")
notify2.Notification(
"System Updater",
"System passed checks, updating ...",
"notification-message-im").show()

if args.check:
exit(0)

run_updates()
if dbus_notify:
notify2.Notification(
Expand Down

0 comments on commit ac0523b

Please sign in to comment.