Skip to content

Commit

Permalink
Try using flutter pub get
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed Jun 18, 2024
1 parent 1cde587 commit daafc55
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pkgs/dart_services/lib/src/project_creator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ProjectCreator {
dependencies: dependencies,
));

final exitCode = await _runDartPubGet(projectDirectory);
final exitCode = await runFlutterPubGet(_sdk, projectPath, log: _log);
if (exitCode != 0) {
throw StateError('pub get failed ($exitCode)');
}
Expand Down Expand Up @@ -112,17 +112,6 @@ ${_sdk.experiments.map((experiment) => ' - $experiment').join('\n')}
return contents;
}

Future<int> _runDartPubGet(Directory dir) async {
final process = await runWithLogging(
path.join(_sdk.dartSdkPath, 'bin', 'dart'),
arguments: ['pub', 'get'],
workingDirectory: dir.path,
environment: {'PUB_CACHE': _pubCachePath},
log: _log,
);
return process.exitCode;
}

Map<String, String> _dependencyVersions(Iterable<String> packages) {
final allVersions =
parsePubDependenciesFile(dependenciesFile: _dependenciesFile);
Expand Down

0 comments on commit daafc55

Please sign in to comment.