Chromium Code Reviews| Index: sdk/lib/_internal/pub/lib/src/command_runner.dart |
| diff --git a/sdk/lib/_internal/pub/lib/src/command_runner.dart b/sdk/lib/_internal/pub/lib/src/command_runner.dart |
| index 287a469d3c7afab37ae8cae062586b9023f1c47a..8f04ee183d175c8409ad2375150a2233eca9fe30 100644 |
| --- a/sdk/lib/_internal/pub/lib/src/command_runner.dart |
| +++ b/sdk/lib/_internal/pub/lib/src/command_runner.dart |
| @@ -131,10 +131,11 @@ class PubCommandRunner extends CommandRunner { |
| if (options['trace']) { |
| log.dumpTranscript(); |
| } else if (!isUserFacingException(error)) { |
| + String protectArgument(String x) => x.contains(' ') ? '"$x"' : x; |
|
nweiz
2015/03/26 21:46:21
Can you add a TODO here to do proper shell escapin
|
| log.error(""" |
| This is an unexpected error. Please run |
| - pub --trace ${options.arguments.map((arg) => "'$arg'").join(' ')} |
| + pub --trace ${options.arguments.map(protectArgument).join(' ')} |
| and include the results in a bug report on http://dartbug.com/new. |
| """); |