Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tool/lib/commands/serve.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ class ServeCommand extends Command {
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;
Expand Down Expand Up @@ -241,10 +242,10 @@ class ServeCommand extends Command {
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...');
Expand Down
8 changes: 8 additions & 0 deletions tool/lib/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ class CliCommand {
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()) {
Expand Down
Loading