diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-25T16·02+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-25T16·02+0200 |
commit | 67937907ca7e90bc8fe3019d3c4d6436a8eba7ed (patch) | |
tree | 0a06763ab72b6bb6704675ee6a35d001a29b2dc1 /src/libstore/globals.cc | |
parent | 71a20d4d95ad40060857d5da6b813f437267fbb2 (diff) |
nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r-- | src/libstore/globals.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 82f3e952a0b5..e9fe0beca4ef 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -122,6 +122,14 @@ void Settings::set(const string & name, const string & value) } +string Settings::get(const string & name, const string & def) +{ + auto i = settings.find(name); + if (i == settings.end()) return def; + return i->second; +} + + void Settings::update() { get(tryFallback, "build-fallback"); |