summaryrefslogtreecommitdiff
path: root/mkarchroot.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-10-19 16:06:31 -0400
committerDave Reisner <dreisner@archlinux.org>2014-10-19 16:48:03 -0400
commitbf7dc83bab4f002a29866fd30b1574b6fbca36aa (patch)
treeaad5aee7fe5d0840df6109eb86c42555cd9e4933 /mkarchroot.in
parentcae954ddb5d35877eaaea588b84f932863714568 (diff)
save and reuse original argv when auto-elevating
Fixes FS#42277.
Diffstat (limited to 'mkarchroot.in')
-rw-r--r--mkarchroot.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkarchroot.in b/mkarchroot.in
index 5f3d6fe..78384da 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -24,6 +24,8 @@ usage() {
exit 1
}
+orig_argv=("$@")
+
while getopts 'hC:M:c:' arg; do
case "$arg" in
C) pac_conf="$OPTARG" ;;
@@ -37,7 +39,7 @@ shift $(($OPTIND - 1))
(( $# < 2 )) && die 'You must specify a directory and one or more packages.'
-check_root "$0" "$@"
+check_root "$0" "${orig_argv[@]}"
working_dir="$(readlink -f $1)"
shift 1