aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-21 16:21:47 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-21 16:54:53 +0200
commit4546be1b3efd9956fe0f548fbf952b5912024577 (patch)
treeec7f1449f41085ea5c50dc04b83dd178c2c86822 /src/libutil/util.hh
parentc55bf085eb914bd06bba00670a293b3c0528b81f (diff)
nix-build, nix-shell: Don't print error message if nix-store/nix-instantiate fails
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 1a43bf400..259c73260 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -247,7 +247,16 @@ pid_t startProcess(std::function<void()> fun, const ProcessOptions & options = P
string runProgram(Path program, bool searchPath = false,
const Strings & args = Strings(), const string & input = "");
-MakeError(ExecError, Error)
+class ExecError : public Error
+{
+public:
+ int status;
+
+ template<typename... Args>
+ ExecError(int status, Args... args)
+ : Error(args...), status(status)
+ { }
+};
/* Convert a list of strings to a null-terminated vector of char
*'s. The result must not be accessed beyond the lifetime of the