summaryrefslogtreecommitdiff
path: root/src/execute.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/execute.cc')
-rw-r--r--src/execute.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/execute.cc b/src/execute.cc
index ad6c2a2..c050732 100644
--- a/src/execute.cc
+++ b/src/execute.cc
@@ -107,7 +107,10 @@ int execute(const ctor::settings& settings,
{
envmap.insert(key + "=" + value);
}
-
+ if(settings.dry_run)
+ {
+ _exit(0);
+ }
auto [_, envv] = envmap.get();
execve(command.data(), const_cast<char* const *>(argv.data()),
const_cast<char* const *>(envv));