about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-05T14·40+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-05T15·08+0200
commit465cb6824401541d82489e11b5223dbfd50bb132 (patch)
tree98b112563cbf08c29e94c4ddc0755de95524186f /src/libutil/util.hh
parenteba840c8a13b465ace90172ff76a0db2899ab11b (diff)
Figure out the user's home directory if $HOME is not set
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index a9950f830c50..5a9c9513fd5c 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -110,6 +110,9 @@ void deletePath(const Path & path, unsigned long long & bytesFreed);
 Path createTempDir(const Path & tmpRoot = "", const Path & prefix = "nix",
     bool includePid = true, bool useGlobalCounter = true, mode_t mode = 0755);
 
+/* Return $HOME or the user's home directory from /etc/passwd. */
+Path getHome();
+
 /* Return $XDG_CACHE_HOME or $HOME/.cache. */
 Path getCacheDir();