about summary refs log tree commit diff
path: root/src/nix-channel/nix-channel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-channel/nix-channel.cc')
-rwxr-xr-xsrc/nix-channel/nix-channel.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc
index 55ebda438965..2083d3df5cab 100755
--- a/src/nix-channel/nix-channel.cc
+++ b/src/nix-channel/nix-channel.cc
@@ -169,7 +169,7 @@ int main(int argc, char ** argv)
 
         // Figure out the name of the channels profile.
         ;
-        auto pw = getpwuid(getuid());
+        auto pw = getpwuid(geteuid());
         std::string name = pw ? pw->pw_name : getEnv("USER", "");
         if (name.empty())
             throw Error("cannot figure out user name");