summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-03-17 10:20:51 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-03-18 12:15:02 +0100
commit05d2b65f279828df5801e6d478991778b3dbe4cc (patch)
tree8693c5f16b2eea5261b2a92666fb0b1a4fb99670
parenta4c3d9410dfa75fc732bdfd2a6a2c965af119435 (diff)
downloadjustbuild-05d2b65f279828df5801e6d478991778b3dbe4cc.tar.gz
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.
-rw-r--r--src/buildtool/execution_api/bazel_msg/bazel_msg_factory.cpp2
1 files changed, 1 insertions, 1 deletions
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{}",