diff --git a/src/utils/execute.cpp b/src/utils/execute.cpp index f0fd6e7..1d0d90a 100644 --- a/src/utils/execute.cpp +++ b/src/utils/execute.cpp @@ -100,7 +100,7 @@ namespace dropshell int ret = system(full_cmd.c_str()); bool ok = EXITSTATUSCHECK(ret); - if (!ok) + if (!ok && !silent) { std::cerr << "Error: Failed to execute command: " << std::endl; std::cerr << full_cmd << std::endl; @@ -126,7 +126,7 @@ namespace dropshell cMode localmode = mode + cMode::RawCommand; bool rval = execute_local_command(ssh_command, output, localmode); - if (!rval) + if (!rval && !hasFlag(mode, cMode::Silent)) { std::cerr << std::endl << std::endl;