From 05d2b65f279828df5801e6d478991778b3dbe4cc Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 17 Mar 2022 10:20:51 +0100 Subject: When representing a directory as json, terminate with new-line character I this way, also resulting trees can cleanly be printed on the command line via the -P option. --- src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp index 8fad8cae..9ba1ccff 100644 --- a/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp +++ b/src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp @@ -580,7 +580,7 @@ auto BazelMsgFactory::DirectoryToString(bazel_re::Directory const& dir) noexcept "reading object infos from Directory failed"); return std::nullopt; } - return json.dump(2); + return json.dump(2) + "\n"; } catch (std::exception const& ex) { Logger::Log(LogLevel::Error, "dumping Directory to string failed with:\n{}", -- cgit v1.2.3