]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
tests: use id to get user/group instead of environment
[apt.git] / test / integration / framework
index de8a65d7a74b930b7a4ac34cacd1d45f9fe7610c..292a7b9581e4456687f0c1fa0c1a5df6bb334ef3 100644 (file)
@@ -383,11 +383,11 @@ EOF
        confighashes 'SHA1' # these are tests, not security best-practices
 
        # create some files in /tmp and look at user/group to get what this means
-       TEST_DEFAULT_USER="$USER"
+       TEST_DEFAULT_USER="$(id -un)"
        if [ "$(uname)" = 'GNU/kFreeBSD' ]; then
                TEST_DEFAULT_GROUP='root'
        else
-               TEST_DEFAULT_GROUP="$USER"
+               TEST_DEFAULT_GROUP="$(id -gn)"
        fi
 
        # cleanup the environment a bit