From 4320c28c1b61c1c38cdad4fdccb74eec10e58b10 Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Wed, 21 Sep 2022 15:54:50 +0200 Subject: [PATCH] packages/cli: clean up wrapping --- packages/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cli.py b/packages/cli.py index eaf951b..e3a5527 100644 --- a/packages/cli.py +++ b/packages/cli.py @@ -27,11 +27,12 @@ def build( rebuild_dependants: bool = False, try_download: bool = False, ): + config.enforce_profile_device_set(hint_or_set_arch=True) + enforce_wrap() arch = arch or get_profile_device(hint_or_set_arch=True).arch if arch not in ARCHES: raise Exception(f'Unknown architecture "{arch}". Choices: {", ".join(ARCHES)}') - config.enforce_config_loaded() return build_packages_by_paths( paths, @@ -170,6 +171,7 @@ def cmd_clean(what: Iterable[str] = ['all'], force: bool = False, noop: bool = F def cmd_list(): "List information about available source packages (PKGBUILDs)" logging.info('Discovering packages.') + check_programs_wrap(['makepkg', 'pacman']) packages = discover_pkgbuilds() logging.info(f'Done! {len(packages)} Pkgbuilds:') for p in set(packages.values()): @@ -182,6 +184,7 @@ def cmd_list(): @click.argument('paths', nargs=-1) def cmd_check(paths): """Check that specified PKGBUILDs are formatted correctly""" + check_programs_wrap(['makepkg']) def check_quoteworthy(s: str) -> bool: quoteworthy = ['"', "'", "$", " ", ";", "&", "<", ">", "*", "?"]