Issue 48682. Run 'dart pub' in PluginManager.
Bug: https://github.com/dart-lang/sdk/issues/48682 Change-Id: Ifc024b381bce23b914a6849c9d82cf89292706a3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240901 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
committed by
Commit Bot
parent
7e7b271586
commit
9fa681712f
@@ -632,13 +632,8 @@ class PluginManager {
|
||||
.getChildAssumingFolder(file_paths.dotDartTool)
|
||||
.getChildAssumingFile(file_paths.packageConfigJson);
|
||||
if (pubCommand != null) {
|
||||
var vmPath = Platform.executable;
|
||||
var pubPath = path.join(path.dirname(vmPath), 'pub');
|
||||
if (Platform.isWindows) {
|
||||
// Process.run requires the `.bat` suffix on Windows
|
||||
pubPath = '$pubPath.bat';
|
||||
}
|
||||
var result = Process.runSync(pubPath, <String>[pubCommand],
|
||||
var result = Process.runSync(
|
||||
Platform.executable, <String>['pub', pubCommand],
|
||||
stderrEncoding: utf8,
|
||||
stdoutEncoding: utf8,
|
||||
workingDirectory: pluginFolder.path,
|
||||
|
||||
Reference in New Issue
Block a user