summaryrefslogtreecommitdiffstats
path: root/arch-nspawn.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-10-19 22:06:31 +0200
committerDave Reisner <dreisner@archlinux.org>2014-10-19 22:48:03 +0200
commitbf7dc83bab4f002a29866fd30b1574b6fbca36aa (patch)
treeaad5aee7fe5d0840df6109eb86c42555cd9e4933 /arch-nspawn.in
parentcae954ddb5d35877eaaea588b84f932863714568 (diff)
downloaddevtools-bf7dc83bab4f002a29866fd30b1574b6fbca36aa.tar.gz
devtools-bf7dc83bab4f002a29866fd30b1574b6fbca36aa.tar.xz
save and reuse original argv when auto-elevating
Fixes FS#42277.
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index b85d360..19f1410 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -26,6 +26,8 @@ usage() {
exit 1
}
+orig_argv=("$@")
+
while getopts 'hC:M:c:' arg; do
case "$arg" in
C) pac_conf="$OPTARG" ;;
@@ -38,7 +40,7 @@ done
shift $(($OPTIND - 1))
(( $# < 1 )) && die 'You must specify a directory.'
-check_root "$0" "$@"
+check_root "$0" "${orig_argv[@]}"
working_dir=$(readlink -f "$1")
shift 1