Skip to content

Commit

Permalink
Pipe the '--stats' flag through for the 'doc sdk' task (#3791)
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins committed Jun 17, 2024
1 parent 6b2ee57 commit 39591df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tool/task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Future<void> runDoc(ArgResults commandResults) async {
'flutter' => docFlutter(withStats: stats),
'help' => _docHelp(),
'package' => _docPackage(commandResults, withStats: stats),
'sdk' => docSdk(),
'sdk' => docSdk(withStats: stats),
'testing-package' => docTestingPackage(),
_ => throw UnimplementedError('Unknown doc target: "$target"'),
};
Expand Down Expand Up @@ -462,9 +462,10 @@ Future<String> docPackage({
return path.join(pubPackageDir.absolute.path, 'doc', 'api');
}

Future<void> docSdk() async => _docSdk(
Future<void> docSdk({bool withStats = false}) async => _docSdk(
sdkDocsPath: _sdkDocsDir.path,
dartdocPath: Directory.current.path,
withStats: withStats,
);

/// Creates a throwaway pub cache and returns the environment variables
Expand Down Expand Up @@ -547,6 +548,7 @@ Future<void> compareSdkWarnings() async {
Future<Iterable<Map<String, Object?>>> _docSdk({
required String sdkDocsPath,
required String dartdocPath,
bool withStats = false,
}) async {
var launcher = SubprocessLauncher('build-sdk-docs');
await launcher
Expand All @@ -570,6 +572,7 @@ Future<Iterable<Map<String, Object?>>> _docSdk({
'lib/resources/blank.txt',
],
workingDirectory: dartdocPath,
withStats: withStats,
);
}

Expand Down

0 comments on commit 39591df

Please sign in to comment.