summaryrefslogtreecommitdiff
path: root/src/execute.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-12-08 11:49:43 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2024-12-08 12:13:37 +0100
commit6cc2e195700e6ce02c04160c0c93af6d325d89d7 (patch)
tree87f76acebf73498d0fab528e043ea84ca1f8b863 /src/execute.cc
parent87997f6285fdba420c00e740d26f98f7e7e06504 (diff)
Call execute with full settings.execute_with_env
Diffstat (limited to 'src/execute.cc')
-rw-r--r--src/execute.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/execute.cc b/src/execute.cc
index b4013d0..94a3d73 100644
--- a/src/execute.cc
+++ b/src/execute.cc
@@ -3,6 +3,8 @@
// See accompanying file LICENSE for details.
#include "execute.h"
+#include "ctor.h"
+
#include <unistd.h>
#include <cstring>
#include <sys/types.h>
@@ -57,10 +59,11 @@ int parent_waitpid(pid_t pid)
extern char **environ; // see 'man environ'
-int execute(const std::string& command,
+int execute(const ctor::settings& settings,
+ const std::string& command,
const std::vector<std::string>& args,
const std::map<std::string, std::string>& env,
- bool verbose)
+ [[maybe_unused]] bool terminate)
{
std::vector<const char*> argv;
argv.push_back(command.data());
@@ -84,7 +87,7 @@ int execute(const std::string& command,
cmd += arg;
}
- if(verbose)
+ if(settings.verbose)
{
std::cout << cmd << std::endl;
}