Improve dry run output readability.

Change-Id: I260993107bc7366555cab21fb6dd981862bf32b7
Reviewed-on: https://dart-review.googlesource.com/c/deps/+/351080
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
diff --git a/lib/cipd.dart b/lib/cipd.dart
index 00645fa..9b45f7c 100644
--- a/lib/cipd.dart
+++ b/lib/cipd.dart
@@ -59,7 +59,7 @@
     log.info('Produced $name instance $instanceId with digest $digest');
     log.info('Running cipd ${registerArguments.join(' ')}...');
     if (isDryRun) {
-      final files = await artifacts.list(recursive: true).toList();
+      final files = (await artifacts.list(recursive: true).toList()).join('\n');
       log.info("Files that would've been included:\n $files");
     } else {
       await Command('cipd', registerArguments).run(raise: true);
diff --git a/test/cipd_test.dart b/test/cipd_test.dart
index 4f48629..070288e 100644
--- a/test/cipd_test.dart
+++ b/test/cipd_test.dart
@@ -74,7 +74,7 @@
       'Running cipd pkg-build -name dart/path/package/platform -in /temp -install-mode copy -out /temp.zip -json-output /temp.json...',
       'Produced dart/path/package/platform instance iid with digest e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
       'Running cipd pkg-register /temp.zip -ref latest -tag version:1.2.3...',
-      "Files that would've been included:\n ${temp.listSync()}",
+      "Files that would've been included:\n ${temp.listSync().join('\n')}",
       'Finished running cipd create for dart/path/package/platform.',
     ]);
   });