Skip to content

Commit

Permalink
Use entryWorkingDirectory instead of project root
Browse files Browse the repository at this point in the history
  • Loading branch information
rehlma committed Jun 11, 2024
1 parent 5a4d162 commit a74f51a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/puro_sidekick_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ void initializePuro(Directory sdk) {
dcli.env['PURO_ROOT'] = puroRootDir.absolute.path;

// Setup puro environment
setupFlutterEnvironment();
_setupFlutterEnvironment();

// Create symlink to puro flutter sdk
final flutterPath = puroFlutterSdkPath();
print('Use Puro Flutter SDK: $flutterPath');
createSymlink(symlinkPath, flutterPath);
}

void setupFlutterEnvironment() {
final sdkVersion = VersionParser(packagePath: SidekickContext.projectRoot).getMaxFlutterSdkVersionFromPubspec();
void _setupFlutterEnvironment() {
final sdkVersion = VersionParser(packagePath: entryWorkingDirectory).getMaxFlutterSdkVersionFromPubspec();
if (sdkVersion == null) {
throw Exception('No Flutter SDK version found in pubspec.yaml');
}
Expand Down

0 comments on commit a74f51a

Please sign in to comment.