aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clients/cave/script_command.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clients/cave/script_command.cc b/src/clients/cave/script_command.cc
index 215b8b713..df895d213 100644
--- a/src/clients/cave/script_command.cc
+++ b/src/clients/cave/script_command.cc
@@ -26,6 +26,7 @@
#include <paludis/util/system.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/process.hh>
#include <iostream>
#include <cstdlib>
@@ -70,8 +71,9 @@ ScriptCommand::run(
n != n_end ; ++n)
arg_str = " " + args::escape(*n);
- paludis::Command cmd(stringify(_imp->executable) + arg_str);
- become_command(cmd);
+ Process process((ProcessCommand(stringify(_imp->executable) + arg_str)));
+ int retcode(process.run().wait());
+ _exit(retcode);
throw InternalError(PALUDIS_HERE, "become_command failed");
}