| Index: sdk/lib/_internal/pub/lib/src/io.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart
|
| index da220e4a537f40fc1a7264f87ad3f9e2cee8234e..122bcf0c8edc260e535eca5148b87e276a3bdcbc 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/io.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/io.dart
|
| @@ -404,7 +404,11 @@ final Stream<String> stdinLines = streamToLines(
|
| /// should just be a fragment like, "Are you sure you want to proceed".
|
| Future<bool> confirm(String message) {
|
| log.fine('Showing confirm message: $message');
|
| - stdout.write("$message (y/n)? ");
|
| + if (runningAsTest) {
|
| + log.message("$message (y/n)?");
|
| + } else {
|
| + stdout.write("$message (y/n)? ");
|
| + }
|
| return streamFirst(stdinLines)
|
| .then((line) => new RegExp(r"^[yY]").hasMatch(line));
|
| }
|
|
|