| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library source.pub_package_map_provider; | 5 library source.pub_package_map_provider; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 return new PackageMapInfo(packageMap, dependencies); | 152 return new PackageMapInfo(packageMap, dependencies); |
| 153 } | 153 } |
| 154 | 154 |
| 155 /** | 155 /** |
| 156 * Run pub list to determine the packages and input files. | 156 * Run pub list to determine the packages and input files. |
| 157 */ | 157 */ |
| 158 io.ProcessResult _runPubListDefault(Folder folder) { | 158 io.ProcessResult _runPubListDefault(Folder folder) { |
| 159 return io.Process.runSync(sdk.pubExecutable.getAbsolutePath(), [ | 159 String executablePath = sdk.pubExecutable.getAbsolutePath(); |
| 160 PUB_LIST_COMMAND | 160 List<String> arguments = [PUB_LIST_COMMAND]; |
| 161 ], workingDirectory: folder.path); | 161 String workingDirectory = folder.path; |
| 162 int subprocessId = AnalysisEngine.instance.instrumentationService |
| 163 .logSubprocessStart(executablePath, arguments, workingDirectory); |
| 164 io.ProcessResult result = io.Process.runSync(executablePath, arguments, |
| 165 workingDirectory: workingDirectory); |
| 166 AnalysisEngine.instance.instrumentationService.logSubprocessResult( |
| 167 subprocessId, result.exitCode, result.stdout, result.stderr); |
| 168 return result; |
| 162 } | 169 } |
| 163 } | 170 } |
| OLD | NEW |