Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 741d0bd

Browse files
author
William Douglas
committed
Make check-update --verbose require root
In order to get the content needed for check-update with the --verbose option, root is required as data is put into the statedir. Keep the old behavior when verbose isn't passed. This was change was required because of the new latest file handling for --incremental. Signed-off-by: William Douglas <[email protected]>
1 parent 68e09aa commit 741d0bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cmds/check_update.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ enum swupd_code check_update_main(int argc, char **argv)
164164
return SWUPD_INVALID_OPTION;
165165
}
166166

167-
ret = swupd_init(SWUPD_NO_ROOT);
167+
if (log_get_level() >= LOG_INFO_VERBOSE) {
168+
ret = swupd_init(SWUPD_ALL);
169+
} else {
170+
ret = swupd_init(SWUPD_NO_ROOT);
171+
}
168172
if (ret != SWUPD_OK) {
169173
return ret;
170174
}

0 commit comments

Comments
 (0)