Skip to content

Commit ec28b05

Browse files
authored
create_api_docs.dart: correct command logging (flutter#155226)
The tool currently prints that the _dart_ command is run, and does not include the 'pub' sub-command. Something like: ```none /private/var/folders/72/ltck4q353hsg3bn8kpkg7f84005w15/T/flutterzXpww6/bin/dart \ global run --enable-asserts dartdoc ``` (newline mine) But this is incorrect; the `runPubGet` function runs the _flutter_ command, and prepends `pub` to the list of arguments.
1 parent 2f149da commit ec28b05

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

dev/tools/create_api_docs.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,8 @@ class DartdocGenerator {
659659

660660
String quote(String arg) => arg.contains(' ') ? "'$arg'" : arg;
661661
print('Executing: (cd "${packageRoot.path}" ; '
662-
'${FlutterInformation.instance.getDartBinaryPath().path} '
662+
'${FlutterInformation.instance.getFlutterBinaryPath().path} '
663+
'pub '
663664
'${dartdocArgs.map<String>(quote).join(' ')})');
664665

665666
process = ProcessWrapper(await runPubProcess(
@@ -1086,13 +1087,6 @@ class FlutterInformation {
10861087
@visibleForTesting
10871088
static set instance(FlutterInformation? value) => _instance = value;
10881089

1089-
/// The path to the Dart binary in the Flutter repo.
1090-
///
1091-
/// This is probably a shell script.
1092-
File getDartBinaryPath() {
1093-
return getFlutterRoot().childDirectory('bin').childFile('dart');
1094-
}
1095-
10961090
/// The path to the Dart binary in the Flutter repo.
10971091
///
10981092
/// This is probably a shell script.

0 commit comments

Comments
 (0)