@@ -469,17 +469,18 @@ Map<String, String> createThrowawayPubCache() {
469
469
final String _defaultPubCache = Platform .environment['PUB_CACHE' ] ??
470
470
path.context.resolveTildePath ('~/.pub-cache' );
471
471
472
- Future <void > docTestingPackage () async {
472
+ Future <String > docTestingPackage () async {
473
473
var testPackagePath = testPackage.absolute.path;
474
474
var launcher = SubprocessLauncher ('doc-test-package' );
475
475
await launcher.runStreamedDartCommand (['pub' , 'get' ],
476
476
workingDirectory: testPackagePath);
477
+ var outputPath = _testingPackageDocsDir.absolute.path;
477
478
await launcher.runStreamedDartCommand (
478
479
[
479
480
'--enable-asserts' ,
480
481
path.join (Directory .current.absolute.path, 'bin' , 'dartdoc.dart' ),
481
482
'--output' ,
482
- _testingPackageDocsDir.absolute.path ,
483
+ outputPath ,
483
484
'--example-path-prefix' ,
484
485
'examples' ,
485
486
'--include-source' ,
@@ -489,6 +490,7 @@ Future<void> docTestingPackage() async {
489
490
],
490
491
workingDirectory: testPackagePath,
491
492
);
493
+ return outputPath;
492
494
}
493
495
494
496
final Directory _testingPackageDocsDir =
@@ -649,6 +651,7 @@ Future<void> _serveDocsFrom(String servePath, int port, String context) async {
649
651
}
650
652
651
653
Future <void > serveTestingPackageDocs () async {
654
+ var outputPath = await docTestingPackage ();
652
655
print ('launching dhttpd on port 8002 for SDK' );
653
656
var launcher = SubprocessLauncher ('serve-test-package-docs' );
654
657
await launcher.runStreamed (Platform .resolvedExecutable, [
@@ -659,7 +662,7 @@ Future<void> serveTestingPackageDocs() async {
659
662
'--port' ,
660
663
'8002' ,
661
664
'--path' ,
662
- _testingPackageDocsDir.absolute.path ,
665
+ outputPath ,
663
666
]);
664
667
}
665
668
0 commit comments