From a1e6d2e2a8ef388463a4a5bad709b82b21624da4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 20 Jun 2017 22:39:46 -0400 Subject: test: conf.sh: verify that LIBREUSER is correct when `sudo sudo -u $LIBREUSER` https://labs.parabola.nu/issues/1372 --- test/testenv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/testenv') diff --git a/test/testenv b/test/testenv index 7072326..3bb827f 100755 --- a/test/testenv +++ b/test/testenv @@ -51,12 +51,12 @@ export _librelib_conf_sh_pkgconfdir="$destdir/etc/libretools.d" # Hack to respect our variables in sudo _sudo() { local vars=(TMPDIR PATH LIBRETOOLS_LIBDIR XDG_CACHE_HOME XDG_CONFIG_HOME _librelib_conf_sh_sysconfdir) - local args=() + local env=() local var for var in "${vars[@]}"; do - args+=("$var=${!var}") + env+=("$var=${!var}") done - sudo env "${args[@]}" "$@" + sudo "${env[@]}" "$@" } printf '%s\n' \ '#!/bin/bash' \ -- cgit v1.2.2