Fix `dt serve` command as part of the release process (#9603)
diff --git a/tool/lib/commands/serve.dart b/tool/lib/commands/serve.dart index 722229c..6e3243e 100644 --- a/tool/lib/commands/serve.dart +++ b/tool/lib/commands/serve.dart
@@ -154,7 +154,8 @@ results[SharedCommandArgs.updatePerfetto.flagName] as bool; final useWasm = results[SharedCommandArgs.wasm.flagName] as bool; final noStripWasm = results[SharedCommandArgs.noStripWasm.flagName] as bool; - final noMinifyWasm = results[SharedCommandArgs.noMinifyWasm.flagName] as bool; + final noMinifyWasm = + results[SharedCommandArgs.noMinifyWasm.flagName] as bool; final runPubGet = results[SharedCommandArgs.pubGet.flagName] as bool; final devToolsAppBuildMode = results[SharedCommandArgs.buildMode.flagName] as String; @@ -241,10 +242,10 @@ logStatus('completed building DevTools: $devToolsBuildLocation'); } - logStatus('running pub get for DDS in the local dart sdk'); + logStatus('running gclient sync in the local dart sdk'); await processManager.runProcess( - CliCommand.dart(['pub', 'get']), - workingDirectory: path.join(localDartSdkLocation, 'pkg', 'dds'), + CliCommand.gclient(['sync']), + workingDirectory: localDartSdkLocation, ); logStatus('serving DevTools with a local devtools server...');
diff --git a/tool/lib/utils.dart b/tool/lib/utils.dart index e0c15a8..467bea8 100644 --- a/tool/lib/utils.dart +++ b/tool/lib/utils.dart
@@ -81,6 +81,14 @@ return CliCommand('git', args, throwOnException: throwOnException); } + /// CliCommand helper for running gclient commands. + factory CliCommand.gclient( + List<String> args, { + bool throwOnException = true, + }) { + return CliCommand('gclient', args, throwOnException: throwOnException); + } + factory CliCommand.tool(List<String> args, {bool throwOnException = true}) { var toolPath = Platform.script.toFilePath(); if (!File(toolPath).existsSync()) {