diff options
Diffstat (limited to 'src/buildtool/execution_api/execution_service/server_implementation.cpp')
-rw-r--r-- | src/buildtool/execution_api/execution_service/server_implementation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/execution_service/server_implementation.cpp b/src/buildtool/execution_api/execution_service/server_implementation.cpp index 43edd6aa..988d22a7 100644 --- a/src/buildtool/execution_api/execution_service/server_implementation.cpp +++ b/src/buildtool/execution_api/execution_service/server_implementation.cpp @@ -41,7 +41,7 @@ namespace { template <typename T> auto TryWrite(std::string const& file, T const& content) noexcept -> bool { std::ofstream of{file}; - if (!of.good()) { + if (not of.good()) { Logger::Log(LogLevel::Error, "Could not open {}. Make sure to have write permissions", file); @@ -123,7 +123,7 @@ auto ServerImpl::Run(gsl::not_null<LocalContext const*> const& local_context, fmt::format("{}:{}", interface_, port_), creds, &port_); auto server = builder.BuildAndStart(); - if (!server) { + if (not server) { Logger::Log(LogLevel::Error, "Could not start execution service"); return false; } @@ -133,8 +133,8 @@ auto ServerImpl::Run(gsl::not_null<LocalContext const*> const& local_context, nlohmann::json const& info = { {"interface", interface_}, {"port", port_}, {"pid", pid}}; - if (!pid_file_.empty()) { - if (!TryWrite(pid_file_, pid)) { + if (not pid_file_.empty()) { + if (not TryWrite(pid_file_, pid)) { server->Shutdown(); return false; } @@ -146,8 +146,8 @@ auto ServerImpl::Run(gsl::not_null<LocalContext const*> const& local_context, Compatibility::IsCompatible() ? "compatible " : "", info_str)); - if (!info_file_.empty()) { - if (!TryWrite(info_file_, info_str)) { + if (not info_file_.empty()) { + if (not TryWrite(info_file_, info_str)) { server->Shutdown(); return false; } |