aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-list
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2023-04-17 12:57:52 +0000
committermerakor <cem@ckyln.com>2023-04-17 12:57:52 +0000
commit083dd24902081e93f8459b19e707a3777d53177e (patch)
tree5fedae8dd4d0fa0403f0ccc21b10ca452747013d /src/cpt-list
parentdfb0841da67373ab9f962f8ede51669a30af3e43 (diff)
downloadcpt-083dd24902081e93f8459b19e707a3777d53177e.tar.gz
cpt-list: exit if less than two arguments are given
FossilOrigin-Name: 1f2fe5b6d49f546421cd48e6878632dc860ef7366d7ce7893f89752f11e742d5
Diffstat (limited to 'src/cpt-list')
-rwxr-xr-xsrc/cpt-list1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cpt-list b/src/cpt-list
index a924091..47e5d3c 100755
--- a/src/cpt-list
+++ b/src/cpt-list
@@ -35,6 +35,7 @@ if [ "$PKG" ]; then
printf %s "$2"
fi
elif [ "$VERSIONCHECK" ]; then
+ [ "$#" -ge 2 ] || die "Minimum of 2 arguments required, got: $#"
pkg_list "$1" | grep -Fq "$1 $2 $3"
else
[ "$CURRENT" ] && set -- "${PWD##*/}"