@@ -43,37 +43,37 @@ Future<void> runPubGetIfNeeded(String packageRoot) async {
4343 await runPubGet (packageRoot);
4444 } else {
4545 _logger.info (
46- 'Skipping `pub get`, which has already been run, in `$packageRoot `' );
46+ 'Skipping `dart pub get`, which has already been run, in `$packageRoot `' );
4747 }
4848}
4949
50- /// Runs `pub get` in [workingDirectory] , and throws if the command completed
51- /// with a non-zero exit code.
50+ /// Runs `dart pub get` in [workingDirectory] , and throws if the command
51+ /// completed with a non-zero exit code.
5252///
53- /// For convenience, tries running with `pub get --offline` if `pub get` fails,
54- /// for a better experience when not authenticated to private pub servers.
53+ /// For convenience, tries running with `dart pub get --offline` if `pub get`
54+ /// fails, for a better experience when not authenticated to private pub servers.
5555Future <void > runPubGet (String workingDirectory) async {
56- _logger.info ('Running `pub get` in `$workingDirectory `...' );
56+ _logger.info ('Running `dart pub get` in `$workingDirectory `...' );
5757
58- final process = await Process .start ('pub ' , ['get' ],
58+ final process = await Process .start ('dart ' , ['pub' , 'get' ],
5959 workingDirectory: workingDirectory,
6060 runInShell: true ,
6161 mode: ProcessStartMode .inheritStdio);
6262 final exitCode = await process.exitCode;
6363
6464 if (exitCode == 69 ) {
6565 _logger.info (
66- 'Re-running `pub get` but with `--offline`, to hopefully fix the above error.' );
67- final process = await Process .start ('pub ' , ['get' , '--offline' ],
66+ 'Re-running `dart pub get` but with `--offline`, to hopefully fix the above error.' );
67+ final process = await Process .start ('dart ' , ['pub' , 'get' , '--offline' ],
6868 workingDirectory: workingDirectory,
6969 runInShell: true ,
7070 mode: ProcessStartMode .inheritStdio);
7171 final exitCode = await process.exitCode;
7272 if (exitCode != 0 ) {
73- throw Exception ('pub get failed with exit code: $exitCode ' );
73+ throw Exception ('dart pub get failed with exit code: $exitCode ' );
7474 }
7575 } else if (exitCode != 0 ) {
76- throw Exception ('pub get failed with exit code: $exitCode ' );
76+ throw Exception ('dart pub get failed with exit code: $exitCode ' );
7777 }
7878}
7979
0 commit comments