From ec28b057f24314a01e3fe14ddd6db1556d18c09d Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Sun, 22 Sep 2024 09:01:41 -0700 Subject: [PATCH] create_api_docs.dart: correct command logging (#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. --- dev/tools/create_api_docs.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dev/tools/create_api_docs.dart b/dev/tools/create_api_docs.dart index 543e9df35f..556e201799 100644 --- a/dev/tools/create_api_docs.dart +++ b/dev/tools/create_api_docs.dart @@ -659,7 +659,8 @@ class DartdocGenerator { String quote(String arg) => arg.contains(' ') ? "'$arg'" : arg; print('Executing: (cd "${packageRoot.path}" ; ' - '${FlutterInformation.instance.getDartBinaryPath().path} ' + '${FlutterInformation.instance.getFlutterBinaryPath().path} ' + 'pub ' '${dartdocArgs.map(quote).join(' ')})'); process = ProcessWrapper(await runPubProcess( @@ -1086,13 +1087,6 @@ class FlutterInformation { @visibleForTesting static set instance(FlutterInformation? value) => _instance = value; - /// The path to the Dart binary in the Flutter repo. - /// - /// This is probably a shell script. - File getDartBinaryPath() { - return getFlutterRoot().childDirectory('bin').childFile('dart'); - } - /// The path to the Dart binary in the Flutter repo. /// /// This is probably a shell script.