Skip to content

Commit ac0523b

Browse files
committed
feat: added --check option to run through update checks and exit
1 parent 722c956 commit ac0523b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ublue-update

+7
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,27 @@ def main():
150150
parser = argparse.ArgumentParser()
151151
parser.add_argument("-f", "--force", action="store_true",
152152
help="force manual update, skipping update checks")
153+
parser.add_argument("-c", "--check", action="store_true",
154+
help="run update checks and exit")
153155
args = parser.parse_args()
154156

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

158160
if not args.force:
159161
check_inhibitors()
162+
160163
# system checks passed
161164
if dbus_notify:
165+
log.info("System passed all update checks")
162166
notify2.Notification(
163167
"System Updater",
164168
"System passed checks, updating ...",
165169
"notification-message-im").show()
166170

171+
if args.check:
172+
exit(0)
173+
167174
run_updates()
168175
if dbus_notify:
169176
notify2.Notification(

0 commit comments

Comments
 (0)