From 5ea86b0232ed5f5ff3a4513ec4b30929d5cf245f Mon Sep 17 00:00:00 2001
From: merakor <cem@ckyln.com>
Date: Fri, 25 Sep 2020 09:26:12 +0000
Subject: as_root(): change USER variable

FossilOrigin-Name: 472d451a30b2626be4db9e65c80f1ce9b26504e86570b9e21b20477d88c210e9
---
 src/cpt-lib | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src/cpt-lib')

diff --git a/src/cpt-lib b/src/cpt-lib
index f71a7da..7905ffb 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -318,6 +318,7 @@ as_root() {
     # We are exporting package manager variables, so that we still have the same
     # repository paths / access to the same cache directories etc.
     set -- HOME="$HOME" \
+           USER="$user" \
            XDG_CACHE_HOME="$XDG_CACHE_HOME" \
            CPT_CACHE="$CPT_CACHE" \
            CPT_CHOICE="$CPT_CHOICE" \
-- 
cgit v1.2.3