From 40f476c649e2c1938c391575f4339c6f50b97e7c Mon Sep 17 00:00:00 2001 From: Morten Linderud Date: Sat, 10 Feb 2024 12:46:08 +0100 Subject: fix(pkgctl): skip path arguments that are not directories Several subcommands accept multiple paths in a way that passing a wildcard is an expected use case. Previously this wasn't possible if the main directory contained any text files or scripts. Fix this by skipping none directory paths for such commands. Component: pkgctl Signed-off-by: Morten Linderud --- src/lib/version/upgrade.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/version/upgrade.sh') diff --git a/src/lib/version/upgrade.sh b/src/lib/version/upgrade.sh index e217532..df3b77d 100644 --- a/src/lib/version/upgrade.sh +++ b/src/lib/version/upgrade.sh @@ -99,6 +99,10 @@ pkgctl_version_upgrade() { term_spinner_start "${status_dir}" for path in "${pkgbases[@]}"; do + # skip paths that aren't directories + if [[ ! -d "${path}" ]]; then + continue + fi pushd "${path}" >/dev/null if [[ ! -f "PKGBUILD" ]]; then -- cgit v1.2.3-54-g00ecf