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.
This commit is contained in:
@@ -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<String>(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.
|
||||
|
||||
Reference in New Issue
Block a user