feat(commit): individual packages from config respected
This commit is contained in:
+3
-2
@@ -3,9 +3,10 @@ from commands.util.diff import pkg_diff
|
||||
from commands.util.input_mgr import confirm, password
|
||||
|
||||
from commands.util.printing.diff import print_diff
|
||||
from config.dtype import ArchMgrConfig
|
||||
|
||||
|
||||
def commit(force: bool = False, no_render: bool = False):
|
||||
def commit(config: ArchMgrConfig, force: bool = False, no_render: bool = False):
|
||||
"""Commit the changes to the system
|
||||
|
||||
Args:
|
||||
@@ -15,7 +16,7 @@ def commit(force: bool = False, no_render: bool = False):
|
||||
"""
|
||||
# TODO: Make sure we don't uninstall critical system packages by accident (i.e. prompt user)
|
||||
# Probably do that check in the pacman util lib tho
|
||||
add, remove = pkg_diff([], pacman.list_explicitly_installed())
|
||||
add, remove = pkg_diff(config["pkgs"]["individual"] or [], pacman.list_explicitly_installed())
|
||||
print_diff(add, remove)
|
||||
if confirm(False, "Do you really want to proceed?"):
|
||||
pacman.install_package_list(add)
|
||||
|
||||
Reference in New Issue
Block a user