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 96382da2b218b865dd7a81c9a573ee2c40314a31..ce0645d932b96a6ffcba6217b30ac8262baa599b 100644 |
| --- a/sdk/lib/_internal/pub/lib/src/command_runner.dart |
| +++ b/sdk/lib/_internal/pub/lib/src/command_runner.dart |
| @@ -130,10 +130,12 @@ class PubCommandRunner extends CommandRunner { |
| if (options['trace']) { |
| log.dumpTranscript(); |
| } else if (!isUserFacingException(error)) { |
| + // TODO(23505): Implement proper shell escaping, not a partial hack. |
| + protectArgument(String x) => x.contains(' ') ? '"$x"' : x; |
|
nweiz
2015/05/22 20:01:34
Nit: don't type-annotate local variables, includin
|
| 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. |
| """); |