Currently, if a user has extra arguments on the end of their makechrootpkg command it prints an error and does not add those arguments to the makepkg command line as expected. As far as I can tell it would have never worked this way because according to the specifications for getopts[1] if there is no ":" at the start of the argument list $OPTARG will not be set and $arg will be set to "?", but if there is a ":" $OPTARG will be set to the unknown argument. Unfortunately this means we can not easily get the argument to an unknown option.

--- | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ b/
index d03b703..7e5f8e8 100644
--- a/
+++ b/
@@ -66,7 +66,7 @@ usage() {
  exit 1
-while getopts 'hcur:I:l:nTD:d:' arg; do
+while getopts ':hcur:I:l:nTD:d:' arg; do
  case "$arg" in
  h) usage ;;
  c) clean_first=true ;;
@@ -78,7 +78,7 @@ while getopts 'hcur:I:l:nTD:d:' arg; do
  l) copy="$OPTARG" ;;
  n) run_namcap=true; makepkg_args="$makepkg_args -i" ;;
  T) temp_chroot=true; copy+="-$" ;;
- *) makepkg_args="$makepkg_args -$arg $OPTARG" ;;
+ *) makepkg_args="$makepkg_args -$OPTARG" ;;