diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-09-13 23:06:33 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-09-13 23:06:33 +0200 |
commit | c3e9acd1c0e2e31a35d68a70749c980e5c027175 (patch) | |
tree | d82dd82620f0ed644b2e8ffcc49c27bb7f6db496 | |
parent | c6fa7775de413a799b9a137dceced5dcf0f5e6ed (diff) |
Remove tabs
-rw-r--r-- | src/libfetchers/mercurial.cc | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc index efb4ee8db..191c5af54 100644 --- a/src/libfetchers/mercurial.cc +++ b/src/libfetchers/mercurial.cc @@ -13,30 +13,31 @@ namespace nix::fetchers { namespace { -RunOptions hgOptions(const Strings & args) { - RunOptions opts("hg", args); - opts.searchPath = true; +RunOptions hgOptions(const Strings & args) +{ + RunOptions opts("hg", args); + opts.searchPath = true; - auto env = getEnv(); - // Set HGPLAIN: this means we get consistent output from hg and avoids leakage from a user or system .hgrc. - env["HGPLAIN"] = ""; - opts.environment = env; + auto env = getEnv(); + // Set HGPLAIN: this means we get consistent output from hg and avoids leakage from a user or system .hgrc. + env["HGPLAIN"] = ""; + opts.environment = env; - return opts; + return opts; } // runProgram wrapper that uses hgOptions instead of stock RunOptions. string runHg(const Strings & args, const std::optional<std::string> & input = {}) { - RunOptions opts = hgOptions(args); - opts.input = input; + RunOptions opts = hgOptions(args); + opts.input = input; - auto res = runProgram(opts); + auto res = runProgram(opts); - if (!statusOk(res.first)) - throw ExecError(res.first, fmt("hg %1%", statusToString(res.first))); + if (!statusOk(res.first)) + throw ExecError(res.first, fmt("hg %1%", statusToString(res.first))); - return res.second; + return res.second; } } |